+
Processing OAuth callback...
+
+ );
+};
+
+export default OAuthCallback;
\ No newline at end of file
diff --git a/client/src/lib/hooks/useConnection.ts b/client/src/lib/hooks/useConnection.ts
index 78d3a7d..f12d3cd 100644
--- a/client/src/lib/hooks/useConnection.ts
+++ b/client/src/lib/hooks/useConnection.ts
@@ -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;
}
diff --git a/client/vite.config.ts b/client/vite.config.ts
index dd3bd01..8ef6cbc 100644
--- a/client/vite.config.ts
+++ b/client/vite.config.ts
@@ -5,6 +5,9 @@ import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
+ server: {
+ historyApiFallback: true,
+ },
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),