MCPcopy Create free account
hub / github.com/Noumena-Network/code / removeApiKey

Function removeApiKey

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

Source from the content-addressed store, hash-verified

1242}
1243
1244export async function removeApiKey(): Promise<void> {
1245 await maybeRemoveApiKeyFromMacOSKeychain()
1246
1247 // Also remove from config instead of returning early, for older clients
1248 // that set keys before we supported keychain.
1249 saveGlobalConfig(current => ({
1250 ...current,
1251 primaryApiKey: undefined,
1252 }))
1253
1254 // Clear memo cache
1255 getApiKeyFromConfigOrMacOSKeychain.cache.clear?.()
1256 clearLegacyApiKeyPrefetch()
1257}
1258
1259async function maybeRemoveApiKeyFromMacOSKeychain(): Promise<void> {
1260 try {

Callers 1

removeStoredApiKeyMethod · 0.85

Calls 4

saveGlobalConfigFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected