I'm using firebase anonymous authentication and firebase realtime database with persistence. This question is about if I've to do anything to keep authentication valid.
I understand from firebase folks' helpful responses in stackoverflow that if we use standard auth providers, firebase ensures that the auth token don't expire. For example, this comment and this answer:
Anonymous authentication tokens do not expire and are persisted to disk between runs of your app
That said, can I conclude that even if database persistence is enabled, once the user is authenticated s/he remains authenticated until logged out (or authentication revoked specifically for this user) across app and device restarts?
I'm not sure since the documentation of Enabling offline capabilities of Realtime database mentions this
If your app uses Firebase Authentication, the Firebase Realtime Database client persists the user's authentication token across app restarts. If the auth token expires while your app is offline, the client pauses write operations until your app re-authenticates the user, otherwise the write operations might fail due to security rules.
This makes me wonder if I need to do anything to keep the authentication active across app and device restarts. I'm not interested in the token per se. I'm just interested in keeping the authentication valid until sign out.