使用无密码身份验证删除用户帐户? [英] Deleting User account using Passwordless Authentication?
问题描述
我已经为我的react-native应用程序从firebase实现了无密码的SignUp/SignIn,但是我不明白如果需要使用密码重新验证Delete Account方法或需要最近的SignIn刷新令牌来删除它,该如何工作? ?
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??
简而言之,当我使用无密码身份验证时应该如何使用reauthenticateWithCredential()
?
In short, how should I use reauthenticateWithCredential()
when I'm using Passwordless Authentication??
推荐答案
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);
然后您可以将此credential
传递给对reauthenticateWithCredential
的呼叫.
You can then pass this credential
to your call to reauthenticateWithCredential
.
这篇关于使用无密码身份验证删除用户帐户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!