如何知道Firebase中的注册电子邮件是否已通过验证? [英] How to know whether the Register Email is verified or not in Firebase?

查看:54
本文介绍了如何知道Firebase中的注册电子邮件是否已通过验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

onSubmit(formData) {
if(formData.valid) {
  console.log(formData.value);
  this.af.auth.createUser({
    email: formData.value.email,
    password: formData.value.password
  }).then(
    authState => {
    authState.auth.sendEmailVerification();
    this.router.navigate(['/login'])
  }).catch(
    (err) => {
    console.log(err);
    this.error = err;
  })
}
}

在Firebase中,我像上面的代码一样设置了 SendEmailVerfication ,该电子邮件可以正常发送.但是,在我的应用中,没有点击那些被点击的人,如何有所作为?

In Firebase, I set the SendEmailVerfication like the code above, and the email could send normally.However, in my app, there is no difference between the user who does not click the verification email with those clicked, how to make a difference?

推荐答案

根据文档, User 对象包含

According to the documentation, the User object contains an emailVerified property.

signInWithEmailAndPassword 的用户

这篇关于如何知道Firebase中的注册电子邮件是否已通过验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆