Update to AuthData [duplicate]

让人想犯罪 __ 提交于 2019-12-12 03:49:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!