-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authorization header stops going through after the browser sits idle for a while. #763
Comments
Tagging @frederikprijck :) |
Based on what's been shared, it's hard to tell what can cause this. Did you set the skipWhenExpired setting to true? |
Thanks for the quickest reply :) No i dont have that boolean setting Yes the token expires every five minutes and then based on refresh token a new access token is issued. I see the refresh token logic working in the browser network tab when the API requests fail with a status In one of the articles i was reading these sort of issues can happen if an interceptor or |
This is my refreshToken interceptor in case it helps:
|
It does look like your Interceptor could be causing it, i don't understand why it's calling our SDK's interceptor like that. Can you isolate everything and reproduce it outside of your app for us to look into? |
The solution has been inspired by https://gist.github.com/Toilal/8849bd63d53bd2df2dd4df92d3b12f26 so not a 100% sure why its needed to call the |
I'm going to close this are there currently isnt much for us to action. Happy to reopen if you can provide an example application for us to look into, but I do not believe this is an SDK issue. |
I am facing a weird issue where the JWT interceptor stops sending the authorization header after the browser is sitting for a while and then if an API request is sent. I am unable to replicate this at will and thats why i dont have reproduction steps. I just see these being reported in the server logs intermittently.
I am on the latest available version 5.1.2 of JWT library
Angular 14.2.8
It happens from both MacOS and Windows on Chrome, Safari etc
It works fine for awhile and then same API calls start missing authorization header
This is the code snippet we have:
Any ideas how to debug this?
The text was updated successfully, but these errors were encountered: