HauntingOfMyEXOriginal post
Flutter Developer
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=...#
Summary
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).