You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing to find a way to expire a token at a specific timeframe after its generation using AbsoluteExpirationRelativeToNow.
I tested on a 5 minute expiration for the sake of fast results but intend to use a longer timeframe (20 or 22 hours) when actually implementing it
Calls of AcquireTokenFromClient before 5 minutes (based on the code snippet and sample) should return the same token and after 5 minutes should return a new token
The text was updated successfully, but these errors were encountered:
pmaytak
changed the title
AcquireTokenFromClient acquires token from cache after AbsoluteExpirationRelativeToNow
[Bug] AcquireTokenFromClient acquires token from cache after AbsoluteExpirationRelativeToNow
Sep 29, 2023
For app tokens, MSAL always provides a suggested cache expiry which is token's expiry, and it always takes precedence, and the custom AbsoluteExpiration never overwrites this.
Microsoft.Identity.Web Library
Microsoft.Identity.Web.TokenCache
Microsoft.Identity.Web version
2.13.3
Web app
Sign-in users
Web API
Protected web APIs (validating tokens)
Token cache serialization
In-memory caches
Description
I was testing to find a way to expire a token at a specific timeframe after its generation using AbsoluteExpirationRelativeToNow.
I tested on a 5 minute expiration for the sake of fast results but intend to use a longer timeframe (20 or 22 hours) when actually implementing it
Reproduction steps
https://github.com/calvinkwtang/CacheTest
Error message
No response
Id Web logs
No response
Relevant code snippets
Regression
No response
Expected behavior
Calls of AcquireTokenFromClient before 5 minutes (based on the code snippet and sample) should return the same token and after 5 minutes should return a new token
The text was updated successfully, but these errors were encountered: