mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-08 21:42:47 +08:00
feat(passkey): 添加PassKey支持并优化双重验证登录逻辑
This commit is contained in:
@@ -29,6 +29,13 @@ def login_access_token(
|
||||
mfa_code=otp_password)
|
||||
|
||||
if not success:
|
||||
# 如果是需要MFA验证,返回特殊标识
|
||||
if user_or_message == "MFA_REQUIRED":
|
||||
raise HTTPException(
|
||||
status_code=401,
|
||||
detail="需要双重验证",
|
||||
headers={"X-MFA-Required": "true"}
|
||||
)
|
||||
raise HTTPException(status_code=401, detail=user_or_message)
|
||||
|
||||
# 用户等级
|
||||
|
||||
Reference in New Issue
Block a user