Skip to content

Commit 15960f5

Browse files
committed
refactor: Use new serverspecifickey API
1 parent 0dc6df5 commit 15960f5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

client/src/lib/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
9090
}
9191

9292
clear() {
93-
sessionStorage.removeItem(SESSION_KEYS.CLIENT_INFORMATION);
94-
sessionStorage.removeItem(SESSION_KEYS.TOKENS);
95-
sessionStorage.removeItem(SESSION_KEYS.CODE_VERIFIER);
93+
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.CLIENT_INFORMATION, this.serverUrl));
94+
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.TOKENS, this.serverUrl));
95+
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.CODE_VERIFIER, this.serverUrl));
9696
}
9797
}

client/src/lib/hooks/useConnection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ export function useConnection({
396396

397397
const disconnect = async () => {
398398
await mcpClient?.close();
399+
const authProvider = new InspectorOAuthClientProvider(sseUrl);
399400
authProvider.clear();
400401
setMcpClient(null);
401402
setConnectionStatus("disconnected");

0 commit comments

Comments
 (0)