refactor: Use new serverspecifickey API

This commit is contained in:
Maxwell Gerber 2025-04-16 16:24:49 -07:00
commit 15960f5aa4
No known key found for this signature in database
GPG key ID: BB9C1A99266069B0
2 changed files with 4 additions and 3 deletions

View file

@ -90,8 +90,8 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
}
clear() {
sessionStorage.removeItem(SESSION_KEYS.CLIENT_INFORMATION);
sessionStorage.removeItem(SESSION_KEYS.TOKENS);
sessionStorage.removeItem(SESSION_KEYS.CODE_VERIFIER);
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.CLIENT_INFORMATION, this.serverUrl));
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.TOKENS, this.serverUrl));
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.CODE_VERIFIER, this.serverUrl));
}
}

View file

@ -396,6 +396,7 @@ export function useConnection({
const disconnect = async () => {
await mcpClient?.close();
const authProvider = new InspectorOAuthClientProvider(sseUrl);
authProvider.clear();
setMcpClient(null);
setConnectionStatus("disconnected");