There was an error while loading. Please reload this page.
1 parent 3bf8382 commit 836aa91Copy full SHA for 836aa91
1 file changed
backend/onyx/server/features/mcp/api.py
@@ -816,6 +816,14 @@ async def _connect_oauth(
816
"Known-provider OAuth mode requires a non-empty client_id",
817
)
818
819
+ if credentials_usable and not request.force_reauthentication:
820
+ return MCPUserOAuthConnectResponse(
821
+ server_id=server_id,
822
+ status="already_authenticated",
823
+ authorization_url=None,
824
+ redirect_url=request.return_path,
825
+ )
826
+
827
oauth_result = start_known_provider_oauth_flow(
828
mcp_server=mcp_server,
829
user_id=str(user.id),
0 commit comments