mirror of
https://github.com/LanceGin/jsotp.git
synced 2024-10-06 06:22:08 +08:00
Allow to specify time in verify
This commit is contained in:
parent
fb84dbfe93
commit
7485addea6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user