Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client and Server generating different TOTP #649

Open
rahul-gharat opened this issue Jul 30, 2021 · 6 comments
Open

Client and Server generating different TOTP #649

rahul-gharat opened this issue Jul 30, 2021 · 6 comments

Comments

@rahul-gharat
Copy link

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

@hiagodotme
Copy link

@rahul-gharat I have the same problem =/

@charrismatic
Copy link

I'm also seeing this in one of my services that uses this package

@rahul-gharat
Copy link
Author

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.

@charrismatic
Copy link

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

@rahul-gharat
Copy link
Author

I am using otplib@12.0.0 from npm

@hiagodotme
Copy link

I am using otplib@12.0.0 from npm

I'm too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants