Back

[SOLVED] OAuth missing scope error

  • 0
  • Accounts
  • Web
mitsy0_0
10 Jun, 2023, 17:15

I am using appwrite cloud, and signing up/ signing in like this

TypeScript
                "github",
                "http://localhost:3000/success.html", // Callback URL for success
                "http://localhost:3000/failure.html", // Callback URL for failure
                []
            );```

And when I do `account.get()` on the success page, it returns this error:
```sdk.js:381     GET https://cloud.appwrite.io/v1/account 401```
```AppwriteException: User (role: guests) missing scope (account)
    at e.Client.<anonymous> ```

also, the user gets added but the no. of registered users remain 0
TL;DR
The user was experiencing an OAuth missing scope error. The solution was to enable all cookies in Chrome settings. There was also confusion about the usage stats, which are being rewritten for clarity. Another user reported a similar issue and the suggestion was made to enable third-party cookies or edit the hosts file for local development. The original user was using Appwrite cloud and encountered an error when attempting to sign up/sign in using GitHub. The error indicated that the user was missing the account scope. The number of registered users also remained at zero. No solution was provided for these additional issues.
Drake
10 Jun, 2023, 17:24

You most likely have a 3rd party cookie problem.

You can try searching the internet for how to enable 3rd party cookies.

Otherwise, the easiest thing to do for local development is to edit your hosts file to point app.cloud.appwrite.io to localhost and then use that for your app

mitsy0_0
10 Jun, 2023, 17:29

I enabled all cookies, and it worked

mitsy0_0
10 Jun, 2023, 17:30

thanks Steven

mitsy0_0
10 Jun, 2023, 17:33

Also, could you tell me why registered users are zero (screenshot attached)

Drake
10 Jun, 2023, 18:27

How'd you do that and in what browser?

Drake
10 Jun, 2023, 18:28

The usage stats are a little confusing. We're rewriting it to be clearer

mitsy0_0
16 Jun, 2023, 08:23

In chrome, Settings > Cookies and other site data > Allow all cookies

Drake
16 Jun, 2023, 15:31

[SOLVED] OAuth missing scope error

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