mirror of
https://github.com/bitwarden/server.git
synced 2025-04-09 07:08:15 -05:00
updated otp library. reduced verification window to RFC standard of 1
This commit is contained in:
parent
8514d1f16d
commit
a02b5fcd14
@ -34,7 +34,7 @@ namespace Bit.Core.Identity
|
|||||||
var otp = new Totp(Base32Encoding.ToBytes(user.AuthenticatorKey));
|
var otp = new Totp(Base32Encoding.ToBytes(user.AuthenticatorKey));
|
||||||
|
|
||||||
long timeStepMatched;
|
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);
|
return Task.FromResult(valid);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"Sendgrid": "6.3.4",
|
"Sendgrid": "6.3.4",
|
||||||
"PushSharp": "4.0.10",
|
"PushSharp": "4.0.10",
|
||||||
"WindowsAzure.Storage": "8.0.0",
|
"WindowsAzure.Storage": "8.0.0",
|
||||||
"Otp.NET": "1.0.0"
|
"Otp.NET": "1.0.1"
|
||||||
},
|
},
|
||||||
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user