mirror of
https://github.com/LanceGin/jsotp.git
synced 2026-05-24 00:00:05 +08:00
fix: type check error
This commit is contained in:
@@ -50,6 +50,10 @@ export class HOTP extends OTP {
|
||||
verify(otp, counter) {
|
||||
const otp_count = this.at(counter);
|
||||
|
||||
if (typeof(otp) === 'number') {
|
||||
otp = otp.toString();
|
||||
}
|
||||
|
||||
if (otp === otp_count) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user