简体   繁体   中英

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)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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