Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to validate Email address using Firebase

I'm doing a two step sign up process. First email, then password.

I'd like to validate if the email is not in use or badly formatted first. If it's ok, then show the password form.

Right now I can't find a good way to verify if the email is used.

I'd expect something like this:

 firebaseAuth.validateEmailAddress(email)
like image 826
bernatfortet Avatar asked Jun 02 '17 22:06

bernatfortet


People also ask

Is Firebase email verification free?

Firebase Authentication service is free in all plans.


1 Answers

You can check if an email is in use by checking if fetchProvidersForEmail returns an empty array.

https://firebase.google.com/docs/reference/js/firebase.auth.Auth#fetchProvidersForEmail

like image 94
Eevee Avatar answered Oct 28 '22 20:10

Eevee