使用无密码身份验证删除用户帐户? [英] Deleting User account using Passwordless Authentication?

查看:85
本文介绍了使用无密码身份验证删除用户帐户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为我的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆