guyht / notp

Node One Time Password library, supports HOTP, TOTP and works with Google Authenticator
https://github.com/guyht/notp
MIT License
685 stars 66 forks source link

totp verification always fails. #58

Open relentless-coder opened 3 years ago

relentless-coder commented 3 years ago

I am using the notp.totp.verify method to verify a token for a base32 secret, but it fails for every token. The token is generated on the authenticator app, I tested with both Google's and Microsoft's.

I used the secret to generate totp with notp.totp.gen, but it generates different token than the ones generated by the google's and microsoft's authenticator app.

I'm guessing that's why the verification fails as well, since for a given time step the token doesn't match.

i'm using default time step of 30 seconds.

Uzlopak commented 2 years ago

Is the time on your mobile correct?