rounding epoch off can lead to totp for next cycle
Codeiffor opened this issue · 3 comments
Codeiffor commented
Line 17 in eafbb67
Here in the last 500 ms of current 30 second cycle (or any other period) the totp will be calculated for the next cycle due to rounded off epoch, Shouldn't it be
Math.floor
?bellstrand commented
@Codeiffor You're totally correct.
We should probably write some unit-test with a fake timer and correct this!
bellstrand commented
@Codeiffor Published as v0.0.14
!