Back

Issue with creating Oauth2 session

  • 0
  • Flutter
  • Auth
HauntingOfMyEX
6 Oct, 2024, 10:29

Getting error while using Oauth2provider.google AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401)

Developing for mobile using flutter. After the google account selection page, the user should be redirected back to the app as per our requirement, but it is not happening. Session is getting created on appwrite console but user getting stuck on appwrite page : https://cloud.appwrite.io/console/auth/oauth2/success?project=66face0e0028dbcc5a13&domain=.cloud.appwrite.io&key=a_session_...&secret=...#

TL;DR
Developers facing an error with creating an OAuth2 session using Oauth2provider.google in a mobile app made with Flutter. Users are getting stuck on an Appwrite page after Google account selection instead of being redirected back to the app. Error message: "AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401)." This issue arises due to a missing scope. The solution is to adjust the user's role or permissions to include the needed scope (account).
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