correctly clear scope
This commit is contained in:
parent
40fa6cb27d
commit
eb76696d97
1 changed files with 11 additions and 3 deletions
|
|
@ -46,6 +46,7 @@ import {
|
|||
InspectorOAuthClientProvider,
|
||||
saveClientInformationToSessionStorage,
|
||||
saveScopeToSessionStorage,
|
||||
clearScopeFromSessionStorage,
|
||||
discoverScopes,
|
||||
} from "../auth";
|
||||
import {
|
||||
|
|
@ -144,6 +145,11 @@ export function useConnection({
|
|||
}, [oauthClientId, oauthClientSecret, sseUrl]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!oauthScope) {
|
||||
clearScopeFromSessionStorage(sseUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
saveScopeToSessionStorage(sseUrl, oauthScope);
|
||||
}, [oauthScope, sseUrl]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue