mirror of
https://github.com/bitwarden/server
synced 2025-12-15 07:43:54 +00:00
updated otp library. reduced verification window to RFC standard of 1
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Bit.Core.Identity
|
||||
var otp = new Totp(Base32Encoding.ToBytes(user.AuthenticatorKey));
|
||||
|
||||
long timeStepMatched;
|
||||
var valid = otp.VerifyTotp(token, out timeStepMatched, new VerificationWindow(2, 2));
|
||||
var valid = otp.VerifyTotp(token, out timeStepMatched, new VerificationWindow(1, 1));
|
||||
|
||||
return Task.FromResult(valid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user