Back
AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401)
- 0
- Flutter
- Auth
Tobias
Hi, I currently have this logic:
TypeScript
Future<void> loginWithGitHub(BuildContext context) async {
try {
await account.createOAuth2Session(provider: OAuthProvider.github);
var user = await getUser();
if (user == null) {
logger.w("User not found after GitHub login");
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text("Error during GitHub login! Please try again")));
return;
}
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => Example(user: user)),
);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text("Error during GitHub login! Please try again")));
logger.e("Error during GitHub login", e);
}
}
When calling it one Time, I get this error:
TypeScript
AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401)
but when calling it again, it somehow works. What am I doing wrong?
TL;DR
Issue: The error 'AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401)' is occurring when trying to log in with GitHub.
Solution: The error is due to missing scope (account) for the user's role (guests). Make sure to grant the necessary scope for the role to access the account. Recommended threads
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...