fix: 添加 JWT type 字段修复 SSO token 联调验证

This commit is contained in:
2026-04-09 16:45:19 +08:00
parent 62ebad7bf4
commit 545f5940fe

View File

@@ -109,6 +109,7 @@ def create_access_token(user: dict) -> str:
"sub": str(user["id"]),
"username": user["username"],
"role": user.get("role", "visitor"),
"type": "access", # JWT 类型标识修复auth/me 期望此字段)
"exp": expire,
"iat": datetime.utcnow()
}