diff --git a/pipeline/mutate/mutator_id_token.go b/pipeline/mutate/mutator_id_token.go index 20ebf59da..81ce5be7f 100644 --- a/pipeline/mutate/mutator_id_token.go +++ b/pipeline/mutate/mutator_id_token.go @@ -108,11 +108,16 @@ func (a *MutatorIDToken) tokenToCache(config *CredentialsIDTokenConfig, session } key := a.cacheKey(config, ttl, claims, session) - a.tokenCache.Set(key, &idTokenCacheContainer{ - TTL: ttl, - ExpiresAt: expiresAt, - Token: token, - }, 0) + a.tokenCache.SetWithTTL( + key, + &idTokenCacheContainer{ + TTL: ttl, + ExpiresAt: expiresAt, + Token: token, + }, + 0, + ttl, + ) } func (a *MutatorIDToken) Mutate(r *http.Request, session *authn.AuthenticationSession, config json.RawMessage, rl pipeline.Rule) error {