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 tokens still work after refreshing then token

See original GitHub issue

I tested the with-localstorage example, which uses request header st-cookie instead of cookie. I tested it with Postman, successfully signup and login, and refresh token. After refresing token, I got new accessToken, new refreshToken, new IdRefreshToken, the old tokens(including accessToken, refreshToken) still work. Is that supposed to be still valid after refreshing tokens?

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
leoujzcommented, Nov 18, 2022

agree, it works, thanks very much. After using new tokens to get sessioninfo, I use old tokens to refresh the token and get empty tokens back, then all tokens are invalidated, that’s really great.

0reactions
rishabhpoddarcommented, Nov 17, 2022

not really. If you invalidate the old one, and if that doesn’t reach the frontend (cause of some network issue), then the user will be logged out. Instead, we invalidate the old one only when the new access token or the new refresh token is used. In this case, we also invalidate the other “sibling” refresh token that was generated

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Refresh Tokens - Auth0
Some of the reasons a refresh token may no longer be valid include: the authorization server has revoked the refresh token. the user...
Read more >
What Are Refresh Tokens and How Can They Boost Your ...
Refresh tokens help improve the user experience (UX) around authentication. Since access tokens are typically only valid for a few minutes, an ...
Read more >
Refreshing Tokens — flask-jwt-extended 4.4.4 documentation
Token Freshness Pattern​​ All other routes will still work normally for the user even though their token is no longer fresh . As...
Read more >
Refresh Tokens - OAuth 2.0 Simplified
If you do not get back a new refresh token, then it means your existing refresh token will continue to work when the...
Read more >
For how long I can keep using the refresh token?
Refresh token has a window of 14 days and waits for the user to access to the app so that the refresh-token can...
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