Back

OAuth Session Not Recognized Until After Refresh in Appwrite with Flutter

  • 0
  • Flutter
  • Auth
  • Cloud
shimmy
4 Aug, 2024, 13:23

Hola πŸ™‚

I'm using OAuth with Appwrite in my Flutter app. After creating an OAuth session, it seems there's no session, and I get a user_unauthorized error: AppwriteException (AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401))

However, if I refresh the app, the session is recognized, and everything works as expected.

Do I need to handle the session differently to ensure it's recognized immediately without needing a refresh? Any guidance on how to fix this would be appreciated.

Thanks!

TL;DR
Developers using Flutter with Appwrite are experiencing an issue where the OAuth session is not recognized until after a refresh, leading to a user_unauthorized error. The error stems from a missing scope. To resolve this, developers may need to ensure the session is properly handled to be recognized immediately without requiring a refresh.
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