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
- Urgent Help
Hello Appwrite team, I urgently need your help. I am the founder of OnBuch, an EdTech application used by around 10,000 users in Cameroon. In the last two day...
- Function's Static IP
Is it possible to have static. IP Address instead of Dynamic IP for getting the IP Address whitelist
- How to use dart workspaces to deploy a f...
Hello, I'm developing a Flutter application and I would like to leverage dart pub workspaces to deploy a function with a dart runtime as advertised here : http...