Back

Transfer from Anonymous to Real User

  • 0
  • Self Hosted
  • Flutter
  • Auth
KardoBMB
14 Sep, 2024, 16:02

I am trying to transfer from an Anonymous User to a Real User. The only methods that I use inside my Flutter App to log in are passwordless(magicLink and oAuth). After trying multiple workarounds to convert the user, since there is no direct method to do the conversion, I've decided to create a normal account with an anonymous flag which I can update once the MagicLinkLogin is happening. Basically I have a user with a userId that is logged anonymously and then when I send the magicLink with that userId and the new email I want to update with the new email. However I am faced with an issue in which I can't send the email because I get an error: "user already registered, use another id or a unique one" or something like this. The docs says: If the provided user ID has not been registered. I tought that if I provide the existing ID it would know that I just want to login somehow. Does anyone has a way of converting from anonymous to real user or is there a simpler method to do so which I've missed?

TL;DR
Developer wants to convert from Anonymous User to Real User in Flutter app using passwordless login methods. Workaround involves creating a normal account with an anonymous flag and updating it during MagicLinkLogin. Faced issue with "user already registered" error when trying to update with new email. Solution: Provide a unique user ID that has not been registered yet to avoid the error.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more