更新到AuthData [英] Update to AuthData
问题描述
当验证数据发生变化时,比如说用户更新了他的名字或接受了电子邮件进行验证,我需要让用户重新登录,通过注销登录或者通过询问用户在应用程序中的凭证然后调用 reauthticate()
方法。这是AuthData不会更新,除非用户重新登录的类型。
有什么方法可以强迫AuthStateListener检查更改吗?
用户配置文件仅在用户再次登录时更新的事实是版本9.8和10中的已知问题适用于Android的Firebase身份验证SDK。它将在即将到来的版本中得到修复。请留意SDK的发行说明以了解详情: https://firebase.google.com/支持/发布
在此之前,唯一的解决方法是继续使用Firebase身份验证SDK的版本9.6或签署用户。
请参阅:
When ever the auth data changes, say the user updated his name or accepted the email for verification I need to ask the user to re - login either by logging out and then logging in or by asking user for the credentials in app and then calling reauthticate()
method. That is the AuthData is not being updated unless the user kind of re-logins.
Is there any way where I can kinda force the AuthStateListener to check for changes?
The fact that the user profile is only updated when the user signs in again is a known issue in versions 9.8 and 10 of the Firebase Authentication SDK for Android. It will be fixed in an upcoming version. Keep an eye out on the release notes of the SDK for details: https://firebase.google.com/support/releases
Until that time, the only workarounds are to stay on the version 9.6 of the Firebase Authentication SDK or to sign the user out and in again.
See:
- FirebaseUser's profile is not updated
- https://github.com/firebase/FirebaseUI-Android/issues/409
- displayName showing null after creating user with Firebase Auth
这篇关于更新到AuthData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!