diff --git a/src/commands/login.command.ts b/src/commands/login.command.ts index 0300926..6220219 100644 --- a/src/commands/login.command.ts +++ b/src/commands/login.command.ts @@ -30,7 +30,7 @@ export class LoginCommand extends BaseLoginCommand { }; this.success = async () => { await syncService.fullSync(true); - if (this.cmd.sso != null && this.canInteract) { + if ((this.cmd.sso != null || this.cmd.apiKey != null) && this.canInteract) { const res = new MessageResponse('You are logged in!', '\n' + 'To unlock your vault, use the `unlock` command. ex:\n' + '$ bw unlock'); diff --git a/src/program.ts b/src/program.ts index d34a79e..b831f0d 100644 --- a/src/program.ts +++ b/src/program.ts @@ -108,6 +108,7 @@ export class Program extends BaseProgram { .option('--method ', 'Two-step login method.') .option('--code ', 'Two-step login code.') .option('--sso', 'Log in with Single-Sign On.') + .option('--apiKey', 'Log in with an Api Key.') .option('--check', 'Check login status.', async () => { const authed = await this.main.userService.isAuthenticated(); if (authed) {