avoid default values for token verification

override default values: window=1, window size=30 (see https://github.com/louislam/uptime-kuma/issues/640)
pull/642/head
Andreas Brett 3 years ago committed by GitHub
parent ad0cde6554
commit b5b391c73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -265,7 +265,7 @@ exports.entryPage = "dashboard";
}
if (data.token) {
let verify = notp.totp.verify(data.token, user.twofa_secret);
let verify = notp.totp.verify(data.token, user.twofa_secret, {"window": 1, "time": 30});
if (verify && verify.delta == 0) {
callback({
@ -383,7 +383,7 @@ exports.entryPage = "dashboard";
socket.userID,
]);
let verify = notp.totp.verify(token, user.twofa_secret);
let verify = notp.totp.verify(token, user.twofa_secret, {"window": 1, "time": 30});
if (verify && verify.delta == 0) {
callback({

Loading…
Cancel
Save