File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,6 @@ export const clearClientInformationFromSessionStorage = ({
6666} ;
6767
6868export class InspectorOAuthClientProvider implements OAuthClientProvider {
69-
7069 constructor ( protected serverUrl : string ) {
7170 // Save the server URL to session storage
7271 sessionStorage . setItem ( SESSION_KEYS . SERVER_URL , serverUrl ) ;
@@ -89,10 +88,11 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
8988
9089 async clientInformation ( ) {
9190 // Try to get the preregistered client information from session storage first
92- const preregisteredClientInformation = await getClientInformationFromSessionStorage ( {
93- serverUrl : this . serverUrl ,
94- isPreregistered : true ,
95- } ) ;
91+ const preregisteredClientInformation =
92+ await getClientInformationFromSessionStorage ( {
93+ serverUrl : this . serverUrl ,
94+ isPreregistered : true ,
95+ } ) ;
9696
9797 // If no preregistered client information is found, get the dynamically registered client information
9898 return (
Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ import { z } from "zod";
3636import { ConnectionStatus } from "../constants" ;
3737import { Notification , StdErrNotificationSchema } from "../notificationTypes" ;
3838import { auth } from "@modelcontextprotocol/sdk/client/auth.js" ;
39- import { clearClientInformationFromSessionStorage , InspectorOAuthClientProvider , saveClientInformationToSessionStorage } from "../auth" ;
39+ import {
40+ clearClientInformationFromSessionStorage ,
41+ InspectorOAuthClientProvider ,
42+ saveClientInformationToSessionStorage ,
43+ } from "../auth" ;
4044import packageJson from "../../../package.json" ;
4145import {
4246 getMCPProxyAddress ,
@@ -297,9 +301,7 @@ export function useConnection({
297301
298302 const handleAuthError = async ( error : unknown ) => {
299303 if ( is401Error ( error ) ) {
300- const serverAuthProvider = new InspectorOAuthClientProvider (
301- sseUrl ,
302- ) ;
304+ const serverAuthProvider = new InspectorOAuthClientProvider ( sseUrl ) ;
303305
304306 const result = await auth ( serverAuthProvider , {
305307 serverUrl : sseUrl ,
You can’t perform that action at this time.
0 commit comments