Android FirebaseAuth getCurrentUser() returns user after fresh install/build

笑着哭i 提交于 2019-12-24 21:26:00

问题


I implemented an auto-login on my app's start, if the user signed in before and did not log-out. I do this via FirebaseAuth.getInstance().getCurrentUser()

Now I build the debug-apk and install this on my physical Android phone. getCurrentUser() returns the last user I used on the Android emulator. I really don't want this to happen..

Has anyone an idea how to prevent this ? Or why is FirebaseAuth doing this ?

Thanks!


回答1:


So it turned out, that FirebaseAuth took the signed in Google account from my Android device. I removed it in the settings, and getCurrentUser() returned null



来源:https://stackoverflow.com/questions/54380336/android-firebaseauth-getcurrentuser-returns-user-after-fresh-install-build

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