j256 / two-factor-auth

Two Factor Authentication Java code implementing the Time-based One-time Password Algorithm
ISC License
313 stars 110 forks source link

generateCurrentNumberString cannot match with the authenticator's code #22

Closed Ye37Xin closed 3 years ago

Ye37Xin commented 3 years ago

Hi, Thank you for the insights! I was playing around the code, and I noticed that when testing the Example program, the code been generated by generateCurrentNumberString does not match with the code provided by Authenticator even at the first time(i know the code would change), but even for the fist appeared code in Authenticator cannot matched with the output, do you possibly know the reason?

Ye37Xin commented 3 years ago

Never mind, I found the issue. Thank you

antonbowe commented 3 years ago

Could you tell us? I have the same issue and I dont unterstand.

j256 commented 3 years ago

What problem are you having @antonbowe ? Make sure your device's time is up-to-date.