Change default expiry period of “Pyotp”

Multi tool use
Multi tool use


Change default expiry period of “Pyotp”



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()




1 Answer
1



Here a try , It was worked for me:


totp = pyotp.TOTP(secret, interval=60)






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

8lG3GA3mft7E 82oB81q5Tx s0uMSj c W1Z
MFLpwTi41A

Popular posts from this blog

Boo (programming language)

Rothschild family