Hi Appwrite team,
I’m using Appwrite Auth in a Flutter mobile app and trying to upgrade an anonymous user to Google OAuth.
Docs say that if there is already an active session, a new OAuth2 session should be attached to the currently logged-in account. But in Flutter, createOAuth2Session() creates/logs in a different Google Auth user instead of attaching Google to the existing anonymous user.
Environment:
Flutter app Appwrite Flutter SDK 18.0.0 Platform: Android Provider: Google OAuth2 Flow:
Create anonymous session Complete onboarding From profile, call Google OAuth while anonymous session is still active Code:
`final before = await account.get(); final beforeSession = await account.getSession(sessionId: 'current');
await account.createOAuth2Session( provider: OAuthProvider.google, scopes: ['email', 'profile'], );
final after = await account.get(); final afterSession = await account.getSession(sessionId: 'current');` Logs:
`before userId=6a1735f10af0d84b8fe2 before provider=anonymous
after userId=6a1736370ef80119884d after provider=google
attachedToPreviousSession=false` Expected: after.$id should equal the anonymous user id.
Actual: Appwrite creates/logs in a different Google Auth user, so I end up with 2 Auth users: anonymous + Google.
Question: Is anonymous -> OAuth upgrade supported in Flutter/native via createOAuth2Session()
Recommended threads
- Triggers and call function in function p...
Hello, Today we are experiencing several issues with Appwrite Cloud. Functions triggered by events, or functions called from another function, are taking an e...
- Updating GitHub App access throws error
Steps to reproduce - 1. Have some private repos allowed on the install access 2. New Site/Func > Connect GitHub > see the side card saying `Missing a repo` > cl...
- Bug report: Race condition in Flutter SD...
Hi team, I've found an intermittent bug in the Flutter SDK (v20.3.0) when using `createOAuth2Session` on Android. **Symptoms** After `createOAuth2Session` re...