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
- android platform invaild origina
It happened today suddenly. Our app says invalid origin. And appwrite cloud says every time we tried to add the app to it: "param platformId" is not optional.
- Team invite - 500 error - no email
When executing ```dart await _repository.teams.createMembership( teamId: event.listId, roles: ['member'], email: event.email, url: 'xxxx', ); ``` I se...
- Help with nameservers
I just added our domain, and as per instruction in the page following, it says, "Add the following nameservers on your DNS provider. ..." I want to keep my cu...