0
每当我尝试登录本地安装,我得到这个错误:误差在注册时火力权威性的反应程序
"auth/network-request-failed", message: "A network error (such as timeout, interrupted connection or unreachable host) has occurred."}
在注册时,我只是将用户重定向到一个新的页面,就是这些。
我读到它可能是服务工作人员与create-react-app
作出的问题,但我不完全确定是否是一个好主意,禁用它。
这是我如何处理注册:
handleSubmit(e) {
e.preventDefault();
firebase.auth()
.createUserWithEmailAndPassword(this.state.emailValue, this.state.passValue)
.catch((error) => {
console.error(error)
})
this.handleAuthChange()
}
handleAuthChange() {
firebase.auth().onAuthStateChanged((user) => {
if (user) {
window.location = 'thank-you'
let email = user.email
console.log(email + " logged in")
} else {
window.location = ""
console.log("not logged in")
}
})
}
我应该如何解决这个问题?
为我工作,非常感谢:) – VWang