javascript - Firebase 无密码重新身份验证不起作用
问题描述
我在网络反应应用程序中设置了无密码登录。它有效,但更新电子邮件无效。
有效的登录代码
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!}
即使这是 firebase 文档所说的它不起作用。非常感谢任何帮助。
解决方案
推荐阅读
- regex - 正则表达式从字符串中提取名称
- python - 使用 lxml 解析文章内容时缺少一些文本,这是什么问题?
- java - 尝试制作 Java Web Scraper
- javascript - 通过 Id 和 Xpath 进行点击的 Javascript 代码执行速度非常快
- c# - 如何从 AutomationElement 获取原始元素
- javascript - 在打字稿中,如何使用 es6 语法导入具有默认导出的纯 javascript 文件?
- cucumber - 如何从 Cucumber Scenario 文件中访问 TestNg 参数(动态更改场景名称)
- powershell - 有没有办法找到哪个用户使用 Powershell 在服务器上运行什么应用程序
- ios - 在不同的collectionView单元格中填充不同的tableViews
- android - Android Studio:禁用的活动编辑器设置不断重置(也使用ideavim)