Token refresh error after being idle for few hours #1156
Labels
bug
For tagging faulty or unexpected behavior.
investigation-needed
Indication that the maintainer or involved community members may need to investigate more.
Describe the bug
When I already had a successful http request and I set my device to (hibernate | sleep | shutdown) mode then I went back again to the web-app which I didn't close and make another http request, the token that is being sent to the api is not valid always. As a result, I got 401 every time and I have to reload the page to get a valid token from my IDp. Is there a proper way to handle it like via interceptor?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The incoming request after being idle for few hours should be valid and must be renew first before the actual http call since I provided the "allowedUrls" from the
forRoot
and enabledsendAcessToken
.Desktop (please complete the following information):
Additional context
The provided scope are:
openid b2cClientId
oidc: true
strictDiscoveryDocumentValidation: false
In my APP_INITIALIZER, the steps I have are the ff:
hasValidAccessToken
. If true, I invokesetupAutomaticSilentRefresh()
then resolve the Promise.initCodeFlow
then reject the PromiseThe text was updated successfully, but these errors were encountered: