I'm using Pyotp for generating OTP. Default expiry of this token is 30sec. How can I change the default expiry to some 60 seconds? This is the simple code I'm using.
secret = pyotp.random_base32()
totp = pyotp.TOTP(secret)
otp = totp.now()
Here, give this a try, It did work for me.
totp = pyotp.TOTP(secret, interval=60)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With