我正在使用Firebase电子邮件/密码身份验证 . 在Firebase控制台中为此项目激活此提供程序 . 我正在使用Web SDK,并且已正确配置 .

我有一个注册表单,提示用户输入电子邮件和密码进行注册和身份验证 .

firebase.auth().createUserWithEmailAndPassword(this.email, this.password)

在用户注册时调用 . 然后指导用户进行下一步以填充他/她的简档 .

在此刻

fb.auth.onAuthStateChanged(fbUser => {
if (fbUser) {
   console.log('Logged in. User is: ', fbUser)
} else {
   console.error('not logged in')
}
})

返回'not logged in',而用户应根据Firebase文档登录(https://firebase.google.com/docs/auth/web/password-auth