After 1 hour (configurable in user pool) tokens expire yet CognitoState.LOGGED_IN remains true.
This necessitates complicated logic in the app, i.e checking cognito.user.signInUserSession.idToken.payload.exp at each PrivateRoute change and calls to private APIs, and subsequently attempting a refresh if the checks fail.
Would it be possible for react-cognito to auto-refresh tokens and update CognitoState if the refresh fails?
After 1 hour (configurable in user pool) tokens expire yet
CognitoState.LOGGED_IN
remains true.This necessitates complicated logic in the app, i.e checking
cognito.user.signInUserSession.idToken.payload.exp
at each PrivateRoute change and calls to private APIs, and subsequently attempting a refresh if the checks fail.Would it be possible for react-cognito to auto-refresh tokens and update CognitoState if the refresh fails?