Back

account.get() does not work after authenticating with oAuth2

  • 0
  • Accounts
  • Web
Zeke(Jafesu)
4 Nov, 2023, 17:23

Not sure if i am doing something wrong, I am creating an oauth2 session, then when it loads the success page, it is running an account.get() but it returns with Uncaught (in promise) AppwriteException: User (role: guests) missing scope (account)

are Oauth2 sessions handled differently than email/password?

TL;DR
After successfully authenticating with OAuth2, the account.get() function is not working and returns an error message. The error suggests that the user is missing the required scope (account) for the role (guests). It seems like there might be a problem with third-party cookies. To fix this, check the third party cookie settings and ensure they are enabled. It's also worth reviewing the documentation provided at <https://appwrite.io/docs/advanced/platform/custom-domains>. It appears that OAuth2 sessions may be handled differently than email/password sessions.
Drake
4 Nov, 2023, 18:19

Probably 3rd party cookie problem. See https://appwrite.io/docs/advanced/platform/custom-domains

Zeke(Jafesu)
4 Nov, 2023, 18:33

how do i access the localstorage fallback

Zeke(Jafesu)
4 Nov, 2023, 23:12

I checked local storage and there's nothing there either

Zeke(Jafesu)
4 Nov, 2023, 23:13

It's going through the oath process successfully but not actually signing in (though it did create the account)

Drake
5 Nov, 2023, 17:12

Did you read what I sent? Why are you asking about the local storage fallback? There is no local storage fallback when using oauth

Zeke(Jafesu)
6 Nov, 2023, 00:46

Under third party cookies in the link you sent, it said that it is stored in local storage as a fallback

Zeke(Jafesu)
6 Nov, 2023, 00:47

I see what you're talking about now I think though

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