Closed conormkelly closed 4 years ago
Hi,
Thanks for the feedback.I will have a look. Indeed no need for a PR
Cheers
Xavier
An updated version has been published (version 0.7.7).Let me know if it does solve your issue.
Yes - looks good. Thank you for resolving this so quickly. Much appreciated!
https://github.com/xarenard/simpleotp/blob/c974078900aeac35676acf9448bef1ce1f5f0e64/lib/otp.js#L76
Hi @xarenard ,
I noticed that tokens that begin with a leading
0
are sometimes not the correct length.The problem is that the if statement in the referenced line will only add one zero. If there are two or more leading zeros required, the generated code is not the correct length.
I can submit a PR if you'd like, but it should just be a matter of updating this
if
statement to awhile
loop.