mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
Added --apiKey option to the login command
This commit is contained in:
parent
611e8760c6
commit
421de80daf
@ -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');
|
||||
|
@ -108,6 +108,7 @@ export class Program extends BaseProgram {
|
||||
.option('--method <method>', 'Two-step login method.')
|
||||
.option('--code <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) {
|
||||
|
Loading…
Reference in New Issue
Block a user