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:
|
// Delete the user's data now, we will restore it if the merge fails |
|
repo.delete(prevUser); |
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...
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
prevUserneeds 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:snippets-web/snippets/auth-next/link-multiple-accounts/auth_merge_accounts.js
Lines 21 to 22 in 88aa8eb
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
prevUsercredential, that wouldn't be valid anymore?! Idk...