File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -88,4 +88,16 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
88
88
89
89
return verifier ;
90
90
}
91
+
92
+ clear ( ) {
93
+ sessionStorage . removeItem (
94
+ getServerSpecificKey ( SESSION_KEYS . CLIENT_INFORMATION , this . serverUrl ) ,
95
+ ) ;
96
+ sessionStorage . removeItem (
97
+ getServerSpecificKey ( SESSION_KEYS . TOKENS , this . serverUrl ) ,
98
+ ) ;
99
+ sessionStorage . removeItem (
100
+ getServerSpecificKey ( SESSION_KEYS . CODE_VERIFIER , this . serverUrl ) ,
101
+ ) ;
102
+ }
91
103
}
Original file line number Diff line number Diff line change @@ -396,6 +396,8 @@ export function useConnection({
396
396
397
397
const disconnect = async ( ) => {
398
398
await mcpClient ?. close ( ) ;
399
+ const authProvider = new InspectorOAuthClientProvider ( sseUrl ) ;
400
+ authProvider . clear ( ) ;
399
401
setMcpClient ( null ) ;
400
402
setConnectionStatus ( "disconnected" ) ;
401
403
setCompletionsSupported ( false ) ;
You can’t perform that action at this time.
0 commit comments