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 {
8888
8989 return verifier ;
9090 }
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+ }
91103}
Original file line number Diff line number Diff line change @@ -396,6 +396,8 @@ export function useConnection({
396396
397397 const disconnect = async ( ) => {
398398 await mcpClient ?. close ( ) ;
399+ const authProvider = new InspectorOAuthClientProvider ( sseUrl ) ;
400+ authProvider . clear ( ) ;
399401 setMcpClient ( null ) ;
400402 setConnectionStatus ( "disconnected" ) ;
401403 setCompletionsSupported ( false ) ;
You can’t perform that action at this time.
0 commit comments