1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-12 21:27:35 -05:00

only tracking TOTPs in cache (#3275)

This commit is contained in:
Ike
2023-09-15 13:38:56 -07:00
committed by GitHub
parent 8b30b3c7fd
commit cd0f8ce411

View File

@ -163,7 +163,8 @@ public abstract class BaseRequestValidator<T> where T : class
} }
return; 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); await Core.Utilities.DistributedCacheExtensions.SetAsync(_distributedCache, cacheKey, twoFactorToken, _cacheEntryOptions);
} }