After studying the sending, email verification is possible in the latest version of firebase , although there are no documents, I wanted to check it for myself.
Using the snippet below:
Auth.$onAuthStateChanged(function(firebaseUser) {
if (firebaseUser) {
console.log(firebaseUser);
if (firebaseUser.emailVerified) {
toastr.success('Email verified');
} else {
toastr.info('Do verify email');
}
}
})
console.log(firebaseUser.emailVerified) always returns false, although a send verification was initiated, the received email message was pressed.
Immediately after logging in to the system, I check if the user is checked, if not, send an email:
Auth.$signInWithEmailAndPassword(email, password)
.then(function(firebaseUser) {
if (!firebaseUser.emailVerified) {
firebaseUser.sendEmailVerification();
console.log('Email verification sent');
}
$state.go('home');
})
In my https://console.firebase.google.com/project/my-app-name/authentication/emailseverything is by default, with a confirmation link, like:
Follow this link to verify your email address.
https://my-app-name.firebaseapp.com/__/auth/handler?mode=<action>&oobCode=<code>
, , , , user.emailVerified true.
, , ?