Hi there.
I am using custom authentication, and issuing users with their firebase auth tokens at the time they login on our server. My question is about refreshing the firebase tokens.
The platform is native iOS and Android, and I am really really fuzzy at which point the app should request new ones from my server:
1) when the app starts
2) when the app is foregrounded
3) when the auth token expires
4) all of the above?
The thing that bothers me is that the app could be offline at any of those points and the refresh would fail, but if the app goes online later, firebase could have an expired token at this point?
Our current logins never time out, and so I don't want the addition of firebase to disrupt the UX and log a user out, this should never happen. And to change the expiration timeout / session length to something really ridiculously long seems like a hack way of going about this. I am sure there is a graceful way of solving this, and that I am just confused / looking in the wrong direction, so I would really appreciate some pointers. Is there an FAQ / doc about this somewhere that I am missing?
Thanks!!
-Marcin