Hello, I would like some help on this error please.
My app is already using email and password sign in, but I need to add Google sign in.
I use the same cliente and account objects across the app.
I have create the credentials on the google console.
The id and secret are set on appwrite cloud.
I am not sure why I am getting this exception.
This is the code:
Future<void> signInWithGoogle() async {
final account = ref.read(accountProvider);
final result = await account.createOAuth2Session(
provider: 'google',
);
}
I am targeting all available platforms in flutter, if there is something specific I need to do for each one, please mention it.
Yes, the success and failure urls are different depending on platform. For web, see https://github.com/appwrite/sdk-for-flutter/tree/master#web
Could you please elaborate on this. I was debugging a mac app, still got the exception.
I have added all the platforms as indicated on the docs.
the web section talked about what to do for the oauth2 recirect
what's your project id?
id: linearProgrammingApp
i think the problem is the uppercase chars. could you see if doing setProject() with lowercase works?
Do i need to create a new project on appwrite where the id is all lower-case, or just change the name on the dart code
Is this cloud or self hosted
it is cloud
Then you most recreate. You won't be able to change jt
You can try changing what you pass into setProject
Ohh interesting. Its not case sensitive?
Maybe π
Well, that's acutally good to know,
My Appwrite instance is sets to utf8mb4_general_ci so it's actually case-insensitive, and my function run with upper case ids.
And it should work also with the cloud.
Just changing the string to lowercase on dart, apparently worked, because the browser window appeared and allowed me to authenticate, but I am still getting an exception. Not sure why
final account = ref.read(accountProvider);
final result = await account.createOAuth2Session(
provider: 'google',
);
final accountAfter = await account.get();
debugPrint('google account: ${accountAfter.email}');
}```
Is this Android?
Exception:
AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401) ```
I need to make it work on all platforms, but was testing on macos, web still tell me that I need to correctly set up the redirection link
Should I still re-create the appwrite project? or because the authentication window opened, is not necessary
Recommended threads
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support π I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...
- context deadline exceeded
Hi, in one of my projects i continuously receive context deadline exceeded when trying to reach users API from my local machine: https://fra.cloud.appwrite.io/v...
- π Realtime Flutter SDK Crash β Realtime...
**Summary** When using Appwrite Cloud with the Flutter SDK (latest appwrite release: 21.4.0), Realtime crashes with: ```Unhandled async error: type '_Map<String...