- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用 signInWithCustomToken
方法通过来自另一个应用的重定向在我的单页应用中建立登录。
在我的 SPA 中,我想让用户通过 currentUser.updatePassword(newPassword)
设置密码。除非用户需要重新验证,否则这工作正常:
important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call firebase.User#reauthenticateWithCredential.
我还没有找到使用自定义 token 重新进行身份验证的方法。我错过了什么吗?
最佳答案
是的,没有 reauthenticateWithCustomToken。您需要再次执行自定义 token 登录过程(如果您使用某些不受支持的提供商,请使用该提供商登录并创建新的自定义 token ),确认 UID 与之前的用户匹配,因为您不想切换用户。然后,您对新用户调用 updatePassword。
您可以在使用新的自定义 token 登录用户的过程中实例化新的 Firebase 应用,如果 UID 匹配,则只需在原始身份验证实例中使用相同的自定义 token (可重复使用直至过期)进行 SignInWithCustomToken然后对更新后的 currentUser 调用 updatePassword。
关于javascript - firebase reauthenticateWithCredential 和 signInWithCustomToken,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45436668/
使用新的 firebase 版本,您需要在我的 firebase 应用程序中通过 node.js 访问。 var firebase = require("firebase"); var parms={
我使用 signInWithCustomToken 方法通过来自另一个应用的重定向在我的单页应用中建立登录。 在我的 SPA 中,我想让用户通过 currentUser.updatePassword(
我正在使用带有自定义身份验证的 firebase 9.x。根据文档, token 到期时间不能超过一小时。是否有一个我可以注册的监听器,当 token 过期时将调用它。 该文档还讨论了 token 的
我在使用 Firebase 的 signInWithCustomToken 登录时遇到问题。我是出现如下错误: Error creating custom token: TypeError: fire
我正在为使用 Ionic 制作的移动应用程序使用 Firebase 自定义身份验证系统,并且我使用 Laravel 5.2 作为自定义身份验证后端。 当新用户注册时,我在 laravel 中生成一个
我想通过共享 JWT token 对多个网站上的用户进行身份验证。该 token 最初是由 firebase 生成的,所以我认为它是一个很好且有效的 token (在 jwt.io 上测试过,似乎没问
我试图了解使用 token 的 Firebase 自定义身份验证方法,但文档对我来说并不是那么清楚。在尝试使用 JWT 生成器之前,我想检查是否有一种方法可以使用身份验证响应 token 通过 jav
所以我创建了一个自定义 token const token = authRef.createCustomToken(options.userId, { app: appRootName,
我是一名优秀的程序员,十分优秀!