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
- Update user email using OTP
Hi, I am trying to implement email update using OTP, there is not password associated with the account. One solution I found online is creating appwrite functio...
- RowList: The value of total is coming as...
RowList: The value of total is coming as a String, so it throws an error because it’s not parsed into an int. Error: TypeError: \"37\": type 'String' is not a ...
- [SOLVED] curl error Number: 6 — function...
Hello, I invested a lot of time in this error in a fresh install of appwrite 1.8.1 and lasted until fix, this if for helping anyone that can have the same weird...