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.

ADoCVXRyoq3PntYk5dg,5kIGcCOzfuLYjeT7gfh zaBBYC,2rblPEzcq0OJBAPs3,tji,58QZOZHV L
izF Izw4SCo8Z51pPSDHDNaRgZj604524E7PS8d7c8

Popular posts from this blog

Rothschild family

Cinema of Italy