Ability to store the token in a caching tool
See original GitHub issueAbility to store the token in a caching tool (e.g: Redis with TTL keys) to prevent checking with azure on every request
It would be great to have an ability in which we can store the user token in a caching tool like Redis and set a TTL for it so that it will expire after a while (Probably set the exact time azure would keep the session for the token), so it prevents sending request to azure AD to check the token on each request. I hope It’s clear what I’m asking.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Caching tokens - Amazon Cognito - AWS Documentation
In this solution, you define a cache in your API to store a separate access token for each combination of OAuth scopes and...
Read more >Acquire and cache tokens with Microsoft Authentication ...
MSAL maintains a token cache (or two caches for confidential client applications) and caches a token after it's been acquired. In many cases, ......
Read more >Best Practices - Box Developer Documentation
Because fetching new tokens is expensive, we recommend using a token cache to prevent unnecessary requests. After retrieving a token, store it in...
Read more >Caching Management API Access Tokens in Login Action
Auth0 recently announced the ability to cache tokens within our extensibility solution, Actions. This has been a much requested feature that ...
Read more >Caching strategies for authentication | by Ted Spence
The stumbling block is that verifying an authentication token is slow on purpose ... If you are able to, I strongly encourage you...
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
Thanks again for your kind reply 😃
Hi!
The public key(s) can be found at the url given in the response under the
jwks
key. See line 86.Expiry is checked using the
python-jose
library. It is configured to fail for expired tokens. The behavior is also tested here. You either have disabled auth (misconfiguration), or your token is actually not expired.No, the backend only cares about access tokens. Refreshing etc. should be done by the client.