question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

old token is added to header after token has been refreshed.

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Sambegocommented, May 16, 2020

@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 version v4.1.2 fixes this.

0reactions
Rajpradeep26commented, Nov 19, 2020

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found