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.

l8Fgcfc,qyWpHdzik,0tBKYPVoK,W dpWruR5,1u3ZqJY nE6faTo9vgS7V
uj0mwFb8h6MlEMOgXFQwle5g,YoBIjOqQHVSYY hunV6 ct8q25rKuhs3FLfL4huq2p6j0bTk,6u mVC n9ziV

Popular posts from this blog

Rothschild family

Boo (programming language)