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

Generated TOTP codes don't match the ones in Authenticator Apps #131

Closed
LinuxDragon57 opened this issue Feb 19, 2022 · 1 comment
Closed

Comments

@LinuxDragon57
Copy link

LinuxDragon57 commented Feb 19, 2022

I cannot get the TOTP codes generated with the library to match the ones generated by authenticator apps (namely Aegis, AndOTP, and Google Authenticator) on Android. I followed the instructions given by https://github.com/pyauth/pyotp#working-example

totp = pyotp.TOTP("seed")
print("Current OTP": totp.now())
@kislyuk
Copy link
Member

kislyuk commented Feb 19, 2022

Thank you for your interest in PyOTP. If you need help, please post a complete, syntactically correct reproduction of your issue, as well as the observed vs. expected behavior.

I am going to close this issue for now since it does not appear to be a bug in PyOTP. When you have a full reproduction, feel free to comment here to reopen the issue, or open a new one.

If you are fundamentally understanding and using the TOTP protocol correctly, the most likely source of the type of error that you describe is clock drift between your authenticator app and your server. You can use an NTP client to synchronize the clock with a precise time source.

@kislyuk kislyuk closed this as completed Feb 19, 2022
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

2 participants