From cb75a845a5c22187479b3c73db4ee1e08ad35904 Mon Sep 17 00:00:00 2001 From: Ike Kottlowski Date: Tue, 12 Sep 2023 18:29:41 -0700 Subject: [PATCH] no longer cache remember me token --- src/Identity/IdentityServer/BaseRequestValidator.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Identity/IdentityServer/BaseRequestValidator.cs b/src/Identity/IdentityServer/BaseRequestValidator.cs index 97b4783b7472..2fa41806b972 100644 --- a/src/Identity/IdentityServer/BaseRequestValidator.cs +++ b/src/Identity/IdentityServer/BaseRequestValidator.cs @@ -163,7 +163,10 @@ protected async Task ValidateAsync(T context, ValidatedTokenRequest request, } return; } - await Core.Utilities.DistributedCacheExtensions.SetAsync(_distributedCache, cacheKey, twoFactorToken, _cacheEntryOptions); + if (twoFactorProviderType != TwoFactorProviderType.Remember) + { + await Core.Utilities.DistributedCacheExtensions.SetAsync(_distributedCache, cacheKey, twoFactorToken, _cacheEntryOptions); + } } else {