Firebase confirmation email not being sent -
i've set firebase email/password authentication successfully, security reasons want user confirm her/his email. says on firebases website:
when user signs using email address , password, confirmation email sent verify email address.
but when sign up, doesn't receive confirmation email.
i've looked , can find code sending password reset email, not code sending email confirmation.
i've looked here:
https://firebase.google.com/docs/auth/ios/manage-users#send_a_password_reset_email
anyone got clue how can it?
i noticed new firebase email authentication docs not documented.
firebase.auth().onauthstatechanged(function(user) { user.sendemailverification(); });
do note that:
- you can send email verification users object whom created using email&password method createuserwithemailandpassword
- only after signed users authenticated state, firebase return promise of auth object.
- the old onauth method has been changed onauthstatechanged.
to check if email verified:
firebase.auth().onauthstatechanged(function(user) { if (user.emailverified) { console.log('email verified'); } else { console.log('email not verified'); } });
Comments
Post a Comment