fix: type check error

This commit is contained in:
Gin
2018-11-06 11:24:51 +08:00
parent c21f4ea701
commit 164718bcd4
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -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;
}