localhost oauth not working. general_unauthorized_scope error showing.
{ "message": "User (role: guests) missing scopes ([account])", "code": 401, "type": "general_unauthorized_scope", "version": "1.8.1" } followed th eoauth flow exatcly. Why this error. Documentation for stuff like these are very bad
You might be using the createOauthSession method?
As in this?
account.createOAuth2Session({
provider: OAuthProvider.Github,
success: 'https://example.com/success', // redirect here on success
failure: 'https://example.com/failed', // redirect here on failure
scopes: ['repo', 'user'] // scopes (optional)
});
Yes Shoudl i not use that ?
If you use custom domains this is ok. Else the session created by this method will be deleted for third party cookies. In the oauth docs select the react native one. That shows how to use createOauth2Token
This method is somewhat better than the session method. And dont worry, same method works for web as I use it.
cc: <@257295349314486273> it will be better to update the docs to follow the methods told in the blog https://appwrite.io/blog/post/fixing-oauth2-issues-in-appwrite-cloud
<@822500146658017292> can you create a task for our team to look into updating this later?
qq on this. Is the recommendation to use Oauth2 tokens in a react native app? so we should be using the instructions outlined in the doc above? rather than createOAuth2Session
Yes
thanks. Even for apple authentication?
Its recommended in docs for react native. And I think the createOAuth2Session method does not work on RN. So this is the only method available for oauth's in RN.
I can't seem to get the createOauth2Token method to work on React Native on an ios simulator. I used the exact code in the link above. anyone else got it working?
Recommended threads
- How can I disable client-side account re...
Hi everyone! I’m currently building a game backend using Appwrite, and I’d like to prevent users from creating new accounts directly through the client. My go...
- relationships bug or error idk
hey every one, am using am using appwrite on a project and ran into a problem where by created a relationship and two way to be specific and it is stuck on proc...
- Domain is owned by a different organizat...
Hi Appwrite team, I'm trying to add my custom domain **futlive9.com** to my project, but I'm getting the error: "Domain is owned by a different organization." ...