0
我有我没有找到太多的信息有问题,我甚至看this但我无法找到此异常的解决方案:火力地堡/阵营原住民 - 断言失败
断言失败:opt_onRejected应该是一个功能。你是否将opt_context作为第二个参数而不是第三个参数?
这里是我的功能会抛出异常:
const {currentUser} = firebase.auth()
const credential = firebase.auth.EmailAuthProvider.credential(
currentUser.email,
password)
return (dispatch) => {
currentUser.reauthenticate(credential) // 1. Re-authenticate
.then(
console.log("RE-AUTH"),
currentUser.updateEmail(strEmail) // 2. Update email
.then(
console.log("MAIL UPDATE"),
firebase.database().ref(`users/${currentUser.uid}/`) // 3. Update profile email
.update({email})
.then(console.log("PROFILE UPDATE"))
.catch(error => console.log(error))
)
.catch(error => console.log(error))
)
.catch(error => console.log(error))
}
它的工作原理,因为它改变了电子邮件地址,但除了显示...