MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / clearApiKey

Method clearApiKey

chat/services/apiKeyStore.js:125–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

123 }
124
125 clearApiKey() {
126 this.state = {
127 apiKey: null,
128 apiKeyInfo: null,
129 expiresAt: null,
130 ticketUsed: null
131 };
132
133 if (typeof chatDB !== 'undefined' && chatDB.db) {
134 chatDB.saveSetting(ACCESS_DB_KEY, null).catch(() => {});
135 }
136 localStorage.removeItem(ACCESS_STORAGE_KEY);
137 console.log('🗑️ Cleared API key');
138
139 window.dispatchEvent(new CustomEvent('apikey-cleared'));
140 this.notify();
141 }
142
143 getApiKey() {
144 return this.state.apiKey;

Callers

nothing calls this directly

Calls 2

notifyMethod · 0.95
saveSettingMethod · 0.80

Tested by

no test coverage detected