mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
879abd7fee
commit
422d38fd11
2 changed files with 5 additions and 1 deletions
|
|
@ -1900,7 +1900,7 @@ if len(app.state.config.TOOL_SERVER_CONNECTIONS) > 0:
|
|||
auth_type = tool_server_connection.get("auth_type", "none")
|
||||
if server_id and auth_type == "oauth_2.1":
|
||||
oauth_client_info = tool_server_connection.get("info", {}).get(
|
||||
"oauth_client_info"
|
||||
"oauth_client_info", ""
|
||||
)
|
||||
|
||||
oauth_client_info = decrypt_data(oauth_client_info)
|
||||
|
|
|
|||
|
|
@ -178,7 +178,11 @@ async def set_tool_servers_config(
|
|||
auth_type = connection.get("auth_type", "none")
|
||||
if auth_type == "oauth_2.1" and server_id:
|
||||
try:
|
||||
oauth_client_info = connection.get("info", {}).get(
|
||||
"oauth_client_info", ""
|
||||
)
|
||||
oauth_client_info = decrypt_data(oauth_client_info)
|
||||
|
||||
await request.app.state.oauth_client_manager.add_client(
|
||||
f"{server_type}:{server_id}",
|
||||
OAuthClientInformationFull(**oauth_client_info),
|
||||
|
|
|
|||
Loading…
Reference in a new issue