Ilj*_*lja 6 javascript firebase firebase-authentication
我的注册过程有以下流程:
用户填写详细信息并注册(获取发送验证电子邮件)
此用户登录后,但会看到一个要求进行电子邮件验证的屏幕
用户验证他们的电子邮件并返回应用程序
在这个阶段,如何在emailVerified
不注销用户的情况下获取具有字段的新用户数据?
我希望auth().onAuthStateChanged
一旦emailVerified
更改为 true就会被解雇,但这不会发生,我也无法在 firebase 文档中找到任何刷新功能来手动获取此数据。
我可以获得新值的唯一方法emailVerified
是注销并重新登录,但理想情况下希望避免这种情况。
更新:这是使用 JavaScript SDK
Based on android I did
firebase.auth().currentUser.reload().then(() => {
console.log(firebase.auth().currentUser)
})
Run Code Online (Sandbox Code Playgroud)
this returns updated information about the user, I couldn't find this anywhere in the docs for some reason
归档时间: |
|
查看次数: |
986 次 |
最近记录: |