Ask coding questions

← Back to all posts
Cookie With Sign in With Google
devbois

I am trying to practise adding Sign in with Google. I want to make a cookie with PHP so I can carry the data over multiple pages on the site. The value of this cookie will be profile.getName();, but I cannot find out how I can bring in a JS variable to PHP. Please help.

Voters
devbois
Comments
hotnewtop
xfinnbar

You've used the version of Google auth for client-rendered apps, such as React and Svelte apps. For PHP, Python, Java and other server-side languages, use https://developers.google.com/identity/sign-in/web/server-side-flow.

devbois

@xfinnbar Alright thanks!