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
- Problem with the new Email policies
when user set those thing from cloud panel and when they open that page again or reload that time it forget what we have checked and it set default to false on ...
- Deleted my account, trying to signup aga...
https://cloud.appwrite.io/console/login?error=%7B%22message%22%3A%22This+email+address+must+already+be+in+its+canonical+form.+Please+remove+aliases%2C+tags%2C+o...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I can’t fin...