|
|
|
|
@ -124,14 +124,15 @@ export class LoginCommand {
@@ -124,14 +124,15 @@ export class LoginCommand {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const twoFactorResponse = await this.authService.logInTwoFactor(selectedProvider.type, |
|
|
|
|
response = await this.authService.logInTwoFactor(selectedProvider.type, |
|
|
|
|
twoFactorToken, false); |
|
|
|
|
if (twoFactorResponse.twoFactor) { |
|
|
|
|
return Response.error('Login failed.'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (response.twoFactor) { |
|
|
|
|
return Response.error('Login failed.'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
await this.syncService.fullSync(true); |
|
|
|
|
const res = new MessageResponse('You are logged in!', '\n' + |
|
|
|
|
'To unlock your vault, set your session key to the `BW_SESSION` environment variable. ex:\n' + |
|
|
|
|
|