Hello guys, after updating to the latest Appwrite Flutter package (17.0.1) I am facing completely weird behavior. None of my login ways are working. Whether the normal email/password:
Future<void> signIn(String email, String password) async {
state = const AsyncValue.loading();
try {
await _wrapAppwriteCall(() async {
final session = await _account.createEmailPasswordSession(
email: email, password: password);
final user = await _account.get(); <-- Fails here
});
} ...
}
I get a valid session after the createEmailPasswordSession request, but the next request is failing with this error
AppwriteException (AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401))
No clue what I am doing wrong or what changed.
When I use the OAuth2 way then it is completely random behavior.
Future<void> signInOAuth(String providerName) async {
state = const AsyncValue.loading();
try {
await _wrapAppwriteCall(() async {
final OAuthProvider provider;
if (providerName == 'Google') {
provider = OAuthProvider.google;
} else {
provider = OAuthProvider.apple;
}
await _account.createOAuth2Session(provider: provider);
final session = await _account.getSession(sessionId: 'current');
final user = await _account.get();
});
}....
}
When I use google then it depends on the email account I select which error message I get.
For one user I get this error: AppwriteException (AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401))
For another user I get this error:Missing redirect URL
This is totally weird behavior.
Please give me a hint what could be wrong
Recommended threads
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...
- Flutter OAuth2 webAuth Bug?
I created with flutter an app where I can login in with my Microsoft Account. When I compile it to Web (WASM) or Android (aab) then there is no problem what so ...