Merge remote-tracking branch 'theirs/main' into max/improved-oauth-callback

This commit is contained in:
Maxwell Gerber
2025-04-16 16:08:11 -07:00
54 changed files with 4452 additions and 2888 deletions

View File

@@ -1,5 +1,5 @@
import { useEffect, useRef } from "react";
import { authProvider } from "../lib/auth";
import { InspectorOAuthClientProvider } from "../lib/auth";
import { SESSION_KEYS } from "../lib/constants";
import { auth } from "@modelcontextprotocol/sdk/client/auth.js";
import { useToast } from "@/hooks/use-toast.ts";
@@ -43,7 +43,10 @@ const OAuthCallback = ({ onConnect }: OAuthCallbackProps) => {
let result;
try {
result = await auth(authProvider, {
// Create an auth provider with the current server URL
const serverAuthProvider = new InspectorOAuthClientProvider(serverUrl);
result = await auth(serverAuthProvider, {
serverUrl,
authorizationCode: params.code,
});