INNER CODE UNIT · TypeScript
isLoggedIn
exoframejs/exoframe · packages/exoframe-cli/src/config/index.ts:87
export async function isLoggedIn() {
const userConfig = await getConfig();
if (!userConfig.user || !userConfig.user.username) {
console.log(chalk.red('Error: not logged in!'), 'Please, login first!');
return false;
}
return true;
}
/**
* Removes the current user session from the CLI config.
*
* @returns Resolves when the stored session has been cleared.
*/
export async function logout() {
const userConfig = await getConfig();
delete userConfig.user;