0

Using Firebase auth from https://github.com/invertase/react-native-firebase for the react-native project. It works well in all scenarios, handling the token renewal and auth state changes. But when I keep the app open for sometime , and do nothing , or just minimise and come back to the app after 30 mins or 1 hour of inactivity, the

firebase
    .auth()
    .currentUser?.getIdTokenResult(true)

returns an expired token ( probably it's not refreshing it when i request.

nullUser
  • 1,159
  • 2
  • 15
  • 26
  • This sounds like it should be a bug report in that repo you linked. You should provide full code and instructions on how to reproduce the issue. – Doug Stevenson Dec 31 '21 at 03:11
  • Hi @DougStevenson, I tried this, but looks like the library is providing a valid token, realised that the expiry time is provided rightly by the library / internal firebase JS SDK. But this gets invalidated by the server component ( firebase .net sdk). I've raised a new question here https://stackoverflow.com/questions/70661222/firebase-idtoken-verification-fails-with-valid-tokens-after-idle-time – nullUser Jan 11 '22 at 03:18

0 Answers0