@@ -57,18 +57,15 @@ import {
5757import { getMCPServerRequestTimeout } from "@/utils/configUtils" ;
5858import { InspectorConfig } from "../configurationTypes" ;
5959import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js" ;
60- import { CustomHeaders , migrateFromLegacyAuth } from "../types/customHeaders" ;
60+ import { CustomHeaders } from "../types/customHeaders" ;
6161
6262interface UseConnectionOptions {
6363 transportType : "stdio" | "sse" | "streamable-http" ;
6464 command : string ;
6565 args : string ;
6666 sseUrl : string ;
6767 env : Record < string , string > ;
68- // Legacy auth support (for backward compatibility)
69- bearerToken ?: string ;
70- headerName ?: string ;
71- // New custom headers support
68+ // Custom headers support
7269 customHeaders ?: CustomHeaders ;
7370 oauthClientId ?: string ;
7471 oauthScope ?: string ;
@@ -90,8 +87,6 @@ export function useConnection({
9087 args,
9188 sseUrl,
9289 env,
93- bearerToken,
94- headerName,
9590 customHeaders,
9691 oauthClientId,
9792 oauthScope,
@@ -384,16 +379,8 @@ export function useConnection({
384379 // Create an auth provider with the current server URL
385380 const serverAuthProvider = new InspectorOAuthClientProvider ( sseUrl ) ;
386381
387- // Handle custom headers (new approach) or legacy auth (backward compatibility)
388- let finalHeaders : CustomHeaders = [ ] ;
389-
390- if ( customHeaders && customHeaders . length > 0 ) {
391- // Use new custom headers approach
392- finalHeaders = customHeaders ;
393- } else if ( bearerToken || headerName ) {
394- // Migrate from legacy auth approach
395- finalHeaders = migrateFromLegacyAuth ( bearerToken , headerName ) ;
396- }
382+ // Use custom headers (migration is handled in App.tsx)
383+ let finalHeaders : CustomHeaders = customHeaders || [ ] ;
397384
398385 // Add OAuth token if available and no custom headers are set
399386 if ( finalHeaders . length === 0 ) {
0 commit comments