问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/41651454/update-to-authdata