Deleting User account with using Passwordless Authentication?

情到浓时终转凉″ 提交于 2020-03-05 03:19:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!