diff --git a/src/Identity/IdentityServer/BaseRequestValidator.cs b/src/Identity/IdentityServer/BaseRequestValidator.cs index 2fa41806b9..d52d3064a6 100644 --- a/src/Identity/IdentityServer/BaseRequestValidator.cs +++ b/src/Identity/IdentityServer/BaseRequestValidator.cs @@ -163,7 +163,8 @@ public abstract class BaseRequestValidator where T : class } return; } - if (twoFactorProviderType != TwoFactorProviderType.Remember) + // We only want to track TOTPs in the chache to enforce one time use. + if (twoFactorProviderType == TwoFactorProviderType.Authenticator || twoFactorProviderType == TwoFactorProviderType.Email) { await Core.Utilities.DistributedCacheExtensions.SetAsync(_distributedCache, cacheKey, twoFactorToken, _cacheEntryOptions); }