Closed ayshsandu closed 1 year ago
As an immediate fix, the SDK will log out the user if the refresh token is expired. This fix is available with v2.0.3
of the React SDK. As a future improvement, we should allow developer to pass a callback function to be executed on token expiry.
Describe the issue: My observation from an application that has SDK enabled 1 - login to the app 2 - let the tab idle for some time (more than the validity of the refresh token) 3 - come back to the application 4 - refresh the tab 5 - SDK tries to renew the token upon 401 response, but fails as the refresh token is expired 6 - But some controllers show as authenticated due to the state being persisted 7 - session data on the authentication state is not cleared
How to reproduce:
Expected behavior: When all the tokens are expired, At least at the page refresh SDK need to update the status, clan the authentication data from the browser, and reset to an unauthenticated state