MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / removeApiKey

Function removeApiKey

src/utils/auth.ts:1220–1233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1218}
1219
1220export async function removeApiKey(): Promise<void> {
1221 await maybeRemoveApiKeyFromMacOSKeychain()
1222
1223 // Also remove from config instead of returning early, for older clients
1224 // that set keys before we supported keychain.
1225 saveGlobalConfig(current => ({
1226 ...current,
1227 primaryApiKey: undefined,
1228 }))
1229
1230 // Clear memo cache
1231 getApiKeyFromConfigOrMacOSKeychain.cache.clear?.()
1232 clearLegacyApiKeyPrefetch()
1233}
1234
1235async function maybeRemoveApiKeyFromMacOSKeychain(): Promise<void> {
1236 try {

Callers 1

performLogoutFunction · 0.85

Calls 4

saveGlobalConfigFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected