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.

[QUERY] AccessToken refresh - should cache expiry be made configurable?

See original GitHub issue

Query/Question An AccessToken for a ManagedIdentityCredential expires 2 minutes prior to the actual expiry of the underlying token. As these jwt-tokens seem to have a lifetime of 6-8 hours, would it not make sense to have the refresh happen a bit sooner? Or make it configurable? (to prevent disruptions if the token-refresh fails for more than 2min due to service disruptions)

Why is this not a Bug or a feature Request? It may be that the answer is “Refresh of tokens via metadata service instance will never fail for more than 2 minutes”…

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
jianghaolucommented, Nov 19, 2019

@kagkarlsson This is a great scenario I didn’t think of. I plan to get this in our next month’s release. You are welcome to contribute too!

4reactions
kagkarlssoncommented, Nov 20, 2019

Great! Will the PR be public?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Token Best Practices - Auth0
Give tokens an expiration: Technically, once a token is signed, it is valid forever—unless the signing key is changed or expiration explicitly set....
Read more >
token-query: Manage auth and refresh tokens with react-query
If token-query determines that the refresh token has already expired, it will not launch a refresh request at all, but will throw an...
Read more >
Refresh Tokens in ASP.NET Core Web Api - The Blinking Caret
When a request fails because of an expired access token, a new request should be sent to a refresh endpoint with the access...
Read more >
Microsoft identity platform access tokens
When an organization uses token lifetime configuration, the lifetime of refresh tokens can be altered. It's expected that some tokens can go ...
Read more >
Troubleshoot AWS STS security token expired errors when ...
Temporary credentials created with the AssumeRole API action last for one hour by default. After temporary credentials expire, they can't be ...
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