问题
I have implemented passwordless SignUp/SignIn from firebase for my react-native app but I can't understand how will the delete account method work if it needs to be reauthenticated with a password or needs a recent SignIn to refresh the token??
In short, how should I use reauthenticateWithCredential()
when I'm using Passwordless Authentication??
回答1:
The Firebase documentation on Linking/re-authentication with email link has an example of how to get a credentials object from the email link/passwordless sign in:
var credential = firebase.auth.EmailAuthProvider.credentialWithLink(email, window.location.href);
You can then pass this credential
to your call to reauthenticateWithCredential
.
来源:https://stackoverflow.com/questions/59510590/deleting-user-account-with-using-passwordless-authentication