fix: 2fa Nonetype

This commit is contained in:
Edward 2024-02-21 05:42:35 +00:00 committed by GitHub
parent 32e71beca8
commit 3dbb534883
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,8 @@ class TwoFactorAuth:
@staticmethod
def __calc(secret_key: str) -> str:
if not secret_key:
return ""
try:
input_time = int(time.time()) // 30
key = base64.b32decode(secret_key)