Implement OAuth callback
This commit is contained in:
parent
16cb59670c
commit
23f89e49b8
1 changed files with 54 additions and 1 deletions
|
|
@ -166,6 +166,8 @@ export function useConnection({
|
|||
} catch (error) {
|
||||
console.error("Failed to connect to MCP server:", error);
|
||||
if (error instanceof SseError && error.code === 401) {
|
||||
// Store the server URL for the callback handler
|
||||
sessionStorage.setItem('mcp_server_url', sseUrl);
|
||||
const redirectUrl = await startOAuthFlow(sseUrl);
|
||||
window.location.href = redirectUrl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue