Back

[SOLVED] Oauth - AppwriteException: User (role: guests) missing scope (account)

  • 0
  • Self Hosted
  • Web
WasklyWabbit#1
6 Sep, 2023, 18:41

Local install, v1.4.1

i'm calling google oauth to create a session, google sends back success, the user is added to appwrite, and server correclty redirects back to the success app URL.

All good so far.

But the session doesnt seem to be created - as soon as I call account.getSession('current') in the success callback handler, I get the error AppwriteException: User (role: guests) missing scope (account)

Any ideas?

TL;DR
The user is getting an error ("AppwriteException: User (role: guests) missing scope (account)") when trying to create a session using Google OAuth in Appwrite. The user has successfully added the Google OAuth and redirected to the success URL. However, when calling account.getSession('current') in the success handler, the error occurs. Possible solution: It is suggested to check if the hostname for Appwrite is a subdomain of the user's app. There may also be a problem with 3rd party cookies. Verify that the user's app is using a local install of Appwrite version 1.4.1.
Drake
6 Sep, 2023, 18:44

you might be facing a problem with 3rd party cookies. is the hostname for appwrite a subdomain of your app?

WasklyWabbit#1
6 Sep, 2023, 18:45

aaaah - good shout! damn Firefox!!!

Drake
6 Sep, 2023, 18:45

it's okay...it's more secure that way πŸ˜• even though security almost always clashes with convenience

WasklyWabbit#1
6 Sep, 2023, 18:49

[SOLVED] Oauth - AppwriteException: User (role: guests) missing scope (account)

Alsemo
1 Dec, 2023, 11:50

@Drake , hi, may I know what this means? if the self-hosted appwrite is https://appwrite.myhost.com , then what is the success URL looks like?

Drake
1 Dec, 2023, 14:31

Please create a new <#1072905050399191082> post

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