fix: 2fa Nonetype
This commit is contained in:
parent
32e71beca8
commit
3dbb534883
@ -19,6 +19,8 @@ class TwoFactorAuth:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __calc(secret_key: str) -> str:
|
def __calc(secret_key: str) -> str:
|
||||||
|
if not secret_key:
|
||||||
|
return ""
|
||||||
try:
|
try:
|
||||||
input_time = int(time.time()) // 30
|
input_time = int(time.time()) // 30
|
||||||
key = base64.b32decode(secret_key)
|
key = base64.b32decode(secret_key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user