Skip to content
Back

No user data after Google OAuth

  • 0
  • Auth
  • Apple
  • Cloud
jen7619
3 Dec, 2024, 23:37

I'm attempting to integrate Google sign in to an ios app - it seems to work, and redirects back to app. It does create a new user, (or a new user session afterwards), however after the redirect I call getUser(), but the result is nil. Subsequent app opens also do not return any user data although there is an active session still showing on the backend. I've included email, profile and openid in the consent screen as shown in the appwrite tutorial video. Not sure what I'm missing?

TL;DR
Issue: After integrating Google sign-in to an iOS app, developers are not able to retrieve user data using getUser() even though there is an active session on the backend. Solution: Check if the requested scopes (email, profile, openid) are enabled correctly in the consent screen. Make sure that the proper OAuth scopes are set up to access the required user data.
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