Sometimes I'm running in a situation where a Firbease ID token never gets refreshed.
On each app start I force a refresh of the token with getIdToken(true)
and before every call to the server I get the cached token with getIdToken()
which should refresh the token automatically when it is expired (am I right?)
But sometimes I receive an token expired exception every time. Only solution I found till now is to clear all app data. After that the user has to sign in again and everything works. Because the app data hasn't been saved to the server due to the expired token they are lost. So this isn't a solution I want to use.
Does anyone have an idea why that happens and how can I prevent it?
Update I'm using Firbease SDK version 11.6.0 (because there was an issue with notification icon in 11.8.0)