简体   繁体   English

Firebase 认证 email

[英]Firebase Authentication email

Currently, I am working on an Android project.目前,我正在研究 Android 项目。 I started the project with sign up and login pages using Firebase.我使用 Firebase 从注册和登录页面开始了这个项目。 It goes like this:它是这样的:

A new user enters the required details with email and password as login credentials.新用户使用 email 和密码作为登录凭据输入所需的详细信息。 Meanwhile, a verification mail is sent to the provided email address, the user needs to verify the authentication by following the link in the email.同时向提供的email地址发送验证邮件,用户需要通过email中的链接进行验证。 If he didn't authenticate the mail, he won't be able to log in.如果他没有验证邮件,他将无法登录。

Now here the problem occurs!现在问题出现了! What if the user accidentally deleted the email and now he is unable to login into the app, neither he could create a new account with the same email address as firebase won't allow that.如果用户不小心删除了 email 并且现在他无法登录应用程序,他也无法使用与 firebase 相同的 email 地址创建新帐户怎么办。

So, what should I do in this case?那么,在这种情况下我该怎么办? Please Help!请帮忙!

Firebase has no requirement that the user must have verified their email address before they can sign in. While you can definitely prevent the user from using your app and accessing its data until their email address has been verified, you can still call the API to sign them in. Firebase has no requirement that the user must have verified their email address before they can sign in. While you can definitely prevent the user from using your app and accessing its data until their email address has been verified, you can still call the API to sign他们在。

So even when they've lost the verification email, you can call the signInWithEmailAndPassword API to sign the user in to Firebase, and then resend their verification email. So even when they've lost the verification email, you can call the signInWithEmailAndPassword API to sign the user in to Firebase, and then resend their verification email.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM