correctly clear scope

This commit is contained in:
Stanislav Deviatykh 2025-10-22 00:09:57 +03:00
commit eb76696d97

View file

@ -122,6 +122,11 @@ export const saveScopeToSessionStorage = (
}
};
export const clearScopeFromSessionStorage = (serverUrl: string) => {
const key = getServerSpecificKey(SESSION_KEYS.SCOPE, serverUrl);
sessionStorage.removeItem(key);
};
export class InspectorOAuthClientProvider implements OAuthClientProvider {
constructor(protected serverUrl: string) {
// Save the server URL to session storage
@ -243,9 +248,6 @@ export class InspectorOAuthClientProvider implements OAuthClientProvider {
sessionStorage.removeItem(
getServerSpecificKey(SESSION_KEYS.CODE_VERIFIER, this.serverUrl),
);
sessionStorage.removeItem(
getServerSpecificKey(SESSION_KEYS.SCOPE, this.serverUrl),
);
}
}