Allow to specify time in verify

This commit is contained in:
Rémi Cattiau 2018-03-04 16:12:43 -08:00
parent fb84dbfe93
commit 7485addea6

View File

@ -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;