Well, converting an anonymous user to a permanent user doesn't change the user object or the ID. So, if you store cart information and have a reference to the user ID, then you should be good to go.
But if you want to link an anonymous user to an existing permanent account, then you have to handle data conflicts manually. Supabase docs have a good example for that.
Super clear guide, thanks! Have you run into any tricky cases with merging carts once a user upgrades from anonymous to permanent?
Well, converting an anonymous user to a permanent user doesn't change the user object or the ID. So, if you store cart information and have a reference to the user ID, then you should be good to go.
But if you want to link an anonymous user to an existing permanent account, then you have to handle data conflicts manually. Supabase docs have a good example for that.
https://supabase.com/docs/guides/auth/auth-anonymous?queryGroups=language&language=js#resolving-identity-conflicts
Hope it helps!