0
votes

My app is using Firebase Authentication. I'm just wondering when I fire an update of my existing app in Google play, will my Firebase Authentication token of my existing user will be reset (force sign out)?

Or it will be the case (given i don't do anything on client-side), user will still keep the token and can login to my app directly after app updated?

2
updating android app on playstore does not affect Firebase auth or tokenRahul Gaur

2 Answers

1
votes

Short answer is no, this is what according to the Firebase documentation could cause a token to expire:

Refresh tokens expire only when one of the following occurs:

  • The user is deleted
  • The user is disabled
  • A major account change is detected for the user. This includes events like password or email address updates.

So as you can see all of these events have some active interaction with the Firebase database. On the other hand, updating the app is not connected in any way to the Firebase database so it wouldn’t even know that an update was installed, so in the same way that you don’t loose your data when updating your token won’t expire.

Before finishing I want to add that in the case that the reason why you’re asking this is not because you want your users to still be logged in after the update but it’s because you’re looking for a way to force-logout all the users, then you should use

FirebaseAuth.getInstance().revokeRefreshTokens(uid);

to revocate the tokens of every user and then ask them to log in again.

0
votes

In android, you don't need to worry about the firebase authentication token if you are updating your application or in any case, your token expired (unless you reinstall the application). The auth and database SDKs talk to each other and the token is automatically refreshed every hour.