snippets-web icon indicating copy to clipboard operation
snippets-web copied to clipboard

One account should be deleted before linking two existing ones

Open Alynva opened this issue 1 year ago • 0 comments

I'm trying to replicate the example of merging two existing accounts, but I think that the problem is that the docs doesn't explicit says that the prevUser needs to be deleted from Firebase Auth, and not only its data from my "repo", it just says that I need to delete the users's data:

https://github.com/firebase/snippets-web/blob/88aa8eb8210c90263eef7fe1f454cd6477a5a252/snippets/auth-next/link-multiple-accounts/auth_merge_accounts.js#L21-L22

And it says that it would be restored if necessary, but it doesn't restore the actual user that should be deleted beforehand. But to restore it we would need the prevUser credential, that wouldn't be valid anymore?! Idk...

Alynva avatar Nov 16 '23 01:11 Alynva