问题
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