Closed brunophilipe closed 9 years ago
Hello Bruno,
Thank you for your reporting and you have right. The joi
schema is a singleton
and when it was loaded, timestamp
doesn't change.
Sorry for this mistake and I will fix it this afternoon to publish it ASAP.
Best regards.
Hi. It is no problem!
I have made a hotfix in my fork of your project https://github.com/brunophilipe/otp.js/commit/10724ca7d07e1a600ee779aab703f87304b308f7
However, since I have no familiarity with joi
, I am not sure if this is the best way to fix this problem.
Hello,
I've just fixed the issue and I think my solution is better than yours because the solution must be implemented in TOTP.js
and not only in GoogleAuthenticator.js
.
Can you checkout the new version 1.0.4
and test if it's OK for you.
My unit tests are OK but I prefer check with real-time tests.
If it's OK for you, I will closed this issue.
Thank you for your collaboration.
Best regards.
I found that manually setting the timestamp on
GoogleAuthnticator.js
line 248 fixes the problem, like so:I believe it is being caused by
joi
caching the value of timestamp.