refactor: Use new serverspecifickey API
This commit is contained in:
parent
0dc6df57d6
commit
15960f5aa4
2 changed files with 4 additions and 3 deletions
|
|
@ -90,8 +90,8 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
sessionStorage.removeItem(SESSION_KEYS.CLIENT_INFORMATION);
|
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.CLIENT_INFORMATION, this.serverUrl));
|
||||||
sessionStorage.removeItem(SESSION_KEYS.TOKENS);
|
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.TOKENS, this.serverUrl));
|
||||||
sessionStorage.removeItem(SESSION_KEYS.CODE_VERIFIER);
|
sessionStorage.removeItem(getServerSpecificKey(SESSION_KEYS.CODE_VERIFIER, this.serverUrl));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -396,6 +396,7 @@ export function useConnection({
|
||||||
|
|
||||||
const disconnect = async () => {
|
const disconnect = async () => {
|
||||||
await mcpClient?.close();
|
await mcpClient?.close();
|
||||||
|
const authProvider = new InspectorOAuthClientProvider(sseUrl);
|
||||||
authProvider.clear();
|
authProvider.clear();
|
||||||
setMcpClient(null);
|
setMcpClient(null);
|
||||||
setConnectionStatus("disconnected");
|
setConnectionStatus("disconnected");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue