Android FirebaseAuth.getCurrentUser() Never Null

前端 未结 3 569
慢半拍i
慢半拍i 2021-01-18 07:02

I have a DispatchActivity as my Launcher Activity, which is meant to check if there is a user currently signed in. If the user is signed in, I send them to their ProfileActi

3条回答
  •  误落风尘
    2021-01-18 07:42

    Firebase Authentication will cache an authentication token for the user when they're signed in. This prevents having to authenticate every little interaction the user makes with other services provided by Firebase. This token gets automatically refreshed periodically, but until then, the SDK assumes that the token represents the user. You'll find that the token will expire after some time, or you can force the issue by uninstalling and reinstalling the app, or clearing its data.

    Authentication works regardless of the contents of your Realtime Database. They are independent from each other, except where security rules limit access to the currently authenticated user.

提交回复
热议问题