You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the user is offline when their token expires then _callRefreshToken will fail. The failure is not handled well so there's no indication that there was a problem (except that the token no longer works) and there's no attempt to refresh again.
_startAutoRefreshToken uses setTimeout(() => this._callRefreshToken(), value) _callRefreshToken does not throw errors, it returns them so the get ignored here. The token is not refreshed and a new timeout is not set.
I think it would be nice if such failures (regardless of whether it's because you are offline or some other error) trigger a new event type (e.g. TOKEN_REFRESH_FAILED).
Bug report
Describe the bug
If the user is offline when their token expires then
_callRefreshToken
will fail. The failure is not handled well so there's no indication that there was a problem (except that the token no longer works) and there's no attempt to refresh again._startAutoRefreshToken
usessetTimeout(() => this._callRefreshToken(), value)
_callRefreshToken
does not throw errors, it returns them so the get ignored here. The token is not refreshed and a new timeout is not set.Related: #141
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
The text was updated successfully, but these errors were encountered: