Reputation: 2312
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)
Upvotes: 9
Views: 12237
Reputation: 76
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
Upvotes: 6