MCPcopy Create free account
hub / github.com/modelcontextprotocol/inspector / saveScopeToSessionStorage

Function saveScopeToSessionStorage

client/src/lib/auth.ts:115–125  ·  view source on GitHub ↗
(
  serverUrl: string,
  scope: string | undefined,
)

Source from the content-addressed store, hash-verified

113};
114
115export const saveScopeToSessionStorage = (
116 serverUrl: string,
117 scope: string | undefined,
118) => {
119 const key = getServerSpecificKey(SESSION_KEYS.SCOPE, serverUrl);
120 if (scope) {
121 sessionStorage.setItem(key, scope);
122 } else {
123 sessionStorage.removeItem(key);
124 }
125};
126
127export const clearScopeFromSessionStorage = (serverUrl: string) => {
128 const key = getServerSpecificKey(SESSION_KEYS.SCOPE, serverUrl);

Callers 2

useConnectionFunction · 0.90
handleAuthErrorFunction · 0.90

Calls 1

getServerSpecificKeyFunction · 0.90

Tested by

no test coverage detected