Merge pull request #17284 from xyb/feishucn
feat: add Feishu OAuth integration
This commit is contained in:
@@ -602,6 +602,8 @@ class OAuthManager:
|
||||
or (auth_manager_config.OAUTH_USERNAME_CLAIM not in user_data)
|
||||
):
|
||||
user_data: UserInfo = await client.userinfo(token=token)
|
||||
if provider == "feishu" and isinstance(user_data, dict) and "data" in user_data:
|
||||
user_data = user_data["data"]
|
||||
if not user_data:
|
||||
log.warning(f"OAuth callback failed, user data is missing: {token}")
|
||||
raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_CRED)
|
||||
|
||||
Reference in New Issue
Block a user