@@ -57,18 +57,15 @@ import {
57
57
import { getMCPServerRequestTimeout } from "@/utils/configUtils" ;
58
58
import { InspectorConfig } from "../configurationTypes" ;
59
59
import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js" ;
60
- import { CustomHeaders , migrateFromLegacyAuth } from "../types/customHeaders" ;
60
+ import { CustomHeaders } from "../types/customHeaders" ;
61
61
62
62
interface UseConnectionOptions {
63
63
transportType : "stdio" | "sse" | "streamable-http" ;
64
64
command : string ;
65
65
args : string ;
66
66
sseUrl : string ;
67
67
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
72
69
customHeaders ?: CustomHeaders ;
73
70
oauthClientId ?: string ;
74
71
oauthScope ?: string ;
@@ -90,8 +87,6 @@ export function useConnection({
90
87
args,
91
88
sseUrl,
92
89
env,
93
- bearerToken,
94
- headerName,
95
90
customHeaders,
96
91
oauthClientId,
97
92
oauthScope,
@@ -384,16 +379,8 @@ export function useConnection({
384
379
// Create an auth provider with the current server URL
385
380
const serverAuthProvider = new InspectorOAuthClientProvider ( sseUrl ) ;
386
381
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 || [ ] ;
397
384
398
385
// Add OAuth token if available and no custom headers are set
399
386
if ( finalHeaders . length === 0 ) {
0 commit comments