MCPcopy
hub / github.com/codeaashu/claude-code / clearServerTokensFromLocalStorage

Function clearServerTokensFromLocalStorage

src/services/mcp/auth.ts:620–634  ·  view source on GitHub ↗
(
  serverName: string,
  serverConfig: McpSSEServerConfig | McpHTTPServerConfig,
)

Source from the content-addressed store, hash-verified

618}
619
620export function clearServerTokensFromLocalStorage(
621 serverName: string,
622 serverConfig: McpSSEServerConfig | McpHTTPServerConfig,
623): void {
624 const storage = getSecureStorage()
625 const existingData = storage.read()
626 if (!existingData?.mcpOAuth) return
627
628 const serverKey = getServerKey(serverName, serverConfig)
629 if (existingData.mcpOAuth[serverKey]) {
630 delete existingData.mcpOAuth[serverKey]
631 storage.update(existingData)
632 logMCPDebug(serverName, 'Cleared stored tokens')
633 }
634}
635
636type WWWAuthenticateParams = {
637 scope?: string

Callers 3

cleanupSecureStorageFunction · 0.85
revokeServerTokensFunction · 0.85
performMCPOAuthFlowFunction · 0.85

Calls 5

getSecureStorageFunction · 0.85
getServerKeyFunction · 0.85
logMCPDebugFunction · 0.85
readMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected