mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-26 03:01:53 +01:00
formatting
This commit is contained in:
parent
c7160c0870
commit
04b63d16ee
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit c3ad9b9b7df2c70ea9a80627c3c4e263886eaf8b
|
Subproject commit e5db01083cc13df3696bb30562a83d729280ac03
|
@ -89,12 +89,13 @@ export class LoginCommand {
|
|||||||
const options = twoFactorProviders.map((p) => p.name);
|
const options = twoFactorProviders.map((p) => p.name);
|
||||||
options.push(new inquirer.Separator());
|
options.push(new inquirer.Separator());
|
||||||
options.push('Cancel');
|
options.push('Cancel');
|
||||||
const answer: inquirer.Answers = await inquirer.createPromptModule({ output: process.stderr })({
|
const answer: inquirer.Answers =
|
||||||
type: 'list',
|
await inquirer.createPromptModule({ output: process.stderr })({
|
||||||
name: 'method',
|
type: 'list',
|
||||||
message: 'Two-step login method:',
|
name: 'method',
|
||||||
choices: options,
|
message: 'Two-step login method:',
|
||||||
});
|
choices: options,
|
||||||
|
});
|
||||||
const i = options.indexOf(answer.method);
|
const i = options.indexOf(answer.method);
|
||||||
if (i === (options.length - 1)) {
|
if (i === (options.length - 1)) {
|
||||||
return Response.error('Login failed.');
|
return Response.error('Login failed.');
|
||||||
@ -111,11 +112,12 @@ export class LoginCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (twoFactorToken == null) {
|
if (twoFactorToken == null) {
|
||||||
const answer: inquirer.Answers = await inquirer.createPromptModule({ output: process.stderr })({
|
const answer: inquirer.Answers =
|
||||||
type: 'input',
|
await inquirer.createPromptModule({ output: process.stderr })({
|
||||||
name: 'token',
|
type: 'input',
|
||||||
message: 'Two-step login code:',
|
name: 'token',
|
||||||
});
|
message: 'Two-step login code:',
|
||||||
|
});
|
||||||
twoFactorToken = answer.token;
|
twoFactorToken = answer.token;
|
||||||
if (twoFactorToken == null || twoFactorToken === '') {
|
if (twoFactorToken == null || twoFactorToken === '') {
|
||||||
return Response.badRequest('Code is required.');
|
return Response.badRequest('Code is required.');
|
||||||
|
Loading…
Reference in New Issue
Block a user