mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-02-15 22:06:24 +00:00
chg: [login OTP] increase valid window by 1
This commit is contained in:
parent
93f3f20b55
commit
f233aae887
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ def _get_totp(secret):
|
||||||
return pyotp.TOTP(secret)
|
return pyotp.TOTP(secret)
|
||||||
|
|
||||||
def _verify_totp(totp, code):
|
def _verify_totp(totp, code):
|
||||||
return totp.verify(code)
|
return totp.verify(code, valid_window=1)
|
||||||
|
|
||||||
def _get_hotp(secret):
|
def _get_hotp(secret):
|
||||||
return pyotp.HOTP(secret)
|
return pyotp.HOTP(secret)
|
||||||
|
|
Loading…
Add table
Reference in a new issue