diff --git a/client/src/App.tsx b/client/src/App.tsx index 8deba66..246e035 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -227,7 +227,7 @@ const App = () => { newUrl.searchParams.delete("serverUrl"); window.history.replaceState({}, "", newUrl.toString()); // Show success toast for OAuth - toast.success('Successfully authenticated with OAuth'); + toast.success("Successfully authenticated with OAuth"); // Connect to the server connectMcpServer(); } @@ -446,8 +446,8 @@ const App = () => {
The connected server does not support any MCP capabilities
diff --git a/client/src/components/OAuthCallback.tsx b/client/src/components/OAuthCallback.tsx
index 4729e71..a7439df 100644
--- a/client/src/components/OAuthCallback.tsx
+++ b/client/src/components/OAuthCallback.tsx
@@ -1,6 +1,6 @@
-import { useEffect, useRef } from 'react';
-import { handleOAuthCallback } from '../lib/auth';
-import { SESSION_KEYS } from '../lib/constants';
+import { useEffect, useRef } from "react";
+import { handleOAuthCallback } from "../lib/auth";
+import { SESSION_KEYS } from "../lib/constants";
const OAuthCallback = () => {
const hasProcessedRef = useRef(false);
@@ -14,12 +14,12 @@ const OAuthCallback = () => {
hasProcessedRef.current = true;
const params = new URLSearchParams(window.location.search);
- const code = params.get('code');
+ const code = params.get("code");
const serverUrl = sessionStorage.getItem(SESSION_KEYS.SERVER_URL);
if (!code || !serverUrl) {
- console.error('Missing code or server URL');
- window.location.href = '/';
+ console.error("Missing code or server URL");
+ window.location.href = "/";
return;
}
@@ -30,8 +30,8 @@ const OAuthCallback = () => {
// Redirect back to the main app with server URL to trigger auto-connect
window.location.href = `/?serverUrl=${encodeURIComponent(serverUrl)}`;
} catch (error) {
- console.error('OAuth callback error:', error);
- window.location.href = '/';
+ console.error("OAuth callback error:", error);
+ window.location.href = "/";
}
};
@@ -45,4 +45,4 @@ const OAuthCallback = () => {
);
};
-export default OAuthCallback;
\ No newline at end of file
+export default OAuthCallback;
diff --git a/client/src/lib/auth.ts b/client/src/lib/auth.ts
index d4eddb7..0417731 100644
--- a/client/src/lib/auth.ts
+++ b/client/src/lib/auth.ts
@@ -1,32 +1,34 @@
-import pkceChallenge from 'pkce-challenge';
-import { SESSION_KEYS } from './constants';
+import pkceChallenge from "pkce-challenge";
+import { SESSION_KEYS } from "./constants";
export interface OAuthMetadata {
authorization_endpoint: string;
token_endpoint: string;
}
-export async function discoverOAuthMetadata(serverUrl: string): Promise