I am using FirebaseAuthentication and want to avoid having to refresh the auth token every time I need to make an API call to FirebaseRealtime database. If I am using the FireBaseAuth.IdTokenListener and listening for token updates and saving them to preferences every time there is an update and then using the tokens from preferences instead would that be the same as refreshing the token before each use?
If it is feasible, is it a bad practice? I don't know how often these tokens are getting updated.