Currently, I am working on an Android project. I started the project with sign up and login pages using Firebase. It goes like this:
A new user enters the required details with email and password as login credentials. 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. 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.
So, what should I do in this case? Please Help!
Advertisement
Answer
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.
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.