我在网络反应应用程序中设置了无密码登录。它有效,但更新电子邮件无效。
有效的登录代码
firebase.auth()
.sendSignInLinkToEmail(email, {
url: window.location.href,
handleCodeInApp: true,
})
更改电子邮件代码引发错误
credential = firebase.auth.EmailAuthProvider.credentialWithLink(
window.localStorage.getItem('emailForSignIn'),
window.location.href
)
它是导致问题的第二个论点。此步骤是在使用这些凭据调用 reauthenticate 之前。控制台中的错误:
{a: null
code: "auth/argument-error"
message: "Invalid email link!}
现在几个小时都想不通这个问题。非常感谢您的帮助