old token is added to header after token has been refreshed.
See original GitHub issueI am using this for an ionic application. Here is my configuration for tokenGetter() function:
export function jwtOptionsFactory(storage) { return { tokenGetter: () => { return storage.get('token'); }, whitelistedDomains: ['localhost:8100'] }; }
I am refreshing token when expired through an interceptor. After refreshing token, I have saved the new token using ionic storage but when I send a new api call, still old token is attached to the header of the request. How can I fix this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
What Are Refresh Tokens and How to Use Them Securely
A refresh token can help you balance security with usability. Since refresh tokens are typically longer-lived, you can use them to request new ......
Read more >Refresh Tokens - OAuth 2.0 Simplified
The presence of the refresh token means that the access token will expire and you'll be able to get a new one without...
Read more >Does refresh token requires Expired JWT for creating new ...
Here I'm passing expired JWT into Authorization Header. The idea here is to protect your refresh endpoint and make sure only logged-in users ......
Read more >Refreshing Authorization Tokens – Angular 6 - Coding Latte
In this post, we are going to build a http interceptor for refreshing authorization tokens once expired in Angular 6 and RXJS6.
Read more >Refresh Tokens in ASP.NET Core Web Api - The Blinking Caret
It will add a Token-Expired header to the response when a request comes in with an expired token. The client can use this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kzay there was indeed a regression with whitelisted domains using a non-standard port. that slipt through the tests in
v4.1.1
, the latest versionv4.1.2
fixes this.@pradipchitrakar can you please share the interceptor logic which solved the above issue? I am facing the same issue and I could not solve it. Thanks