I think i found a bug on flutter sdk with account.createOAuth2Session(provider: provider);. It is always creating a new account instead of updating my existing anonymous user and linking it. Anyone has any experience?
There's sort of a limitation with flutter/mobile for this...The anonymous session only exists within the app, but when you're trying to create an oauth2 session, it's happening in (essentially) a webview that doesn't have the anonymous session. So, Appwrite doesn't know about the anonymous session in order to convert it
you get the value back with the new id right? so you can link them both on a call
at the moment what i did was delete the orphan anonymous user when it creates the new one, otherwise you get every single user duplicated in the db, but this is not optimal, it should merge the info automatically
You can't just link with an id client side as that wouldn't be secure.
Also, the anonymous session is essentially replaced by the oauth one after the oauth flow because the cookie gets replaced.
then you shoud change the documentation and tell the user that it doesn't link the accounts. The documentation clearly states that the anonymous user will be linked to the "provider" account
that way we know in advance we are creating duplicated accounts and try to figure out a way ourselves
also about this, it won't be secure on client side but it would on server side. I don't see an option to link accounts on server. I could transfer the accounts i want linked and let my own server api decide whether it is good to go
Good idea. Would you please create a GitHub issue and include where you think would be a good place to add the note?
ok
Recommended threads
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...
- Current User is Not authorized
recreating same Thread
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...