Back

Can't get account.prefs is empty for google sign in.

  • 1
  • Auth
  • Web
haysm
27 Sep, 2024, 03:56

I am migrating from firebase, when using oauth and signing in with google, I could access photoUrl as part of the response, however I am not able to do so with appwrite (yet)

Everything is working fine with oauth, I am getting redirected to Google and I sign in without issues, however, I am not finding photoUrl as part of the response when I do account.get() and I couldn't find a way to save it through createOAuth2Session... This is how my call is

await account.createOAuth2Session( OAuthProvider.Google, "http://localhost:3000/home", "http://localhost:3000/login", ["profile", "email", "openid"] );

Is there a way to get user's image from Google or not?

TL;DR
Developers are migrating from Firebase to Appwrite and are having trouble accessing the photoUrl when signing in with Google. The solution can be found in the Appwrite documentation at <https://appwrite.io/docs/products/auth/oauth2#profile>.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more