Client and Server generating different TOTP
rahul-gharat opened this issue · comments
TOTP generated at client and server for the same secret at the same time is different.
(OTP not getting validated).
I tried to play with step and window parameters but didnt worked.
Client Machine has IST timezone and the server has UTC.
I tried to check epoc time at both machines, it is same. (UTC Timestamp is same)
Can someone please help me with this? maybe i am missing something.
Thanks in advance
@rahul-gharat I have the same problem =/
I'm also seeing this in one of my services that uses this package
Hi, As a workaround I used browserify to compile otplib node module and used it at client side. Now it is working fine.
I guess npm module and unpkg module has some code difference.
Do you have any clue to what version the issue might be on, or what version I should use if I follow the steps you mentioned above
I am using otplib@12.0.0 from npm
I am using otplib@12.0.0 from npm
I'm too.