import { log } from './log'; import { getKeytar } from './getKeytar'; const SERVICE = 'alkscli'; const ALKS_TOKEN = 'alkstoken'; export async function removeToken() { log('removing token'); const keytar = await getKeytar(); // Await so a real deletion failure propagates to the caller (the logout // handler catches it) instead of becoming an unhandled rejection after this // resolves — which would let logout falsely report success. A missing entry // is swallowed inside the adapter, so this still resolves cleanly then. await keytar.deletePassword(SERVICE, ALKS_TOKEN); }