speakeasyjs / speakeasy

**NOT MAINTAINED** Two-factor authentication for Node.js. One-time passcode generator (HOTP/TOTP) with support for Google Authenticator.
MIT License
2.68k stars 229 forks source link

window increasing #104

Open krisver opened 6 years ago

krisver commented 6 years ago

Hi, I'm using speakeasy in one of my project and I have problem with window under the verification function. Code looks like that:

var tokenValidates = speakeasy.totp.verify({ secret: secret.base32, encoding: 'base32', token: '123456' }); everything was working, but month later I couldn't login because verification failed. I added window: 2 and everything start to work. Another month later the same issue, when I increased window to 4 again everything start to work, why is it working like that I cannot all the time increasing this value. What to do with this? Thank you for a quick replay.