pyauth / pyotp

Python One-Time Password Library
https://pyauth.github.io/pyotp/
Other
3.03k stars 326 forks source link

Same code on windows and mac produce different results. #123

Closed IsakRein closed 3 years ago

IsakRein commented 3 years ago

When i run the following code simultaneously on mac and windows:

import pyotp
import time
key = "my_secret_key"

totp = pyotp.TOTP(key)
while True:
    print(totp.now())
    time.sleep(1)

the produced six-digit codes are different. The one on mac corresponds with the code from google authentication. So there probably is some issue on windows

IsakRein commented 3 years ago

Solved it after many hours of headscratching... was an issue with the time on my computer..