From 7485addea68d4fe629dd82403f640bdd838dae9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Cattiau?= Date: Sun, 4 Mar 2018 16:12:43 -0800 Subject: [PATCH] Allow to specify time in verify --- src/totp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/totp.js b/src/totp.js index cbe753a..d926314 100644 --- a/src/totp.js +++ b/src/totp.js @@ -72,8 +72,8 @@ export class TOTP extends OTP { if (time == null) { time = new Date(); - otp_time = this.now(); } + otp_time = super.generate_otp(Util.timecode(time, this.interval)); if (otp === otp_time) { return true;