1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

Feature/cli fail login on captcha request (#439)

* Fail CLI login if captcha is required by the server.

* Linter fixes
This commit is contained in:
Matt Gibson 2021-07-23 14:27:48 -05:00 committed by GitHub
parent e1ce721364
commit ecdd08624f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -166,6 +166,10 @@ export class LoginCommand {
} else {
response = await this.authService.logIn(email, password);
}
if (response.captchaSiteKey) {
return Response.badRequest('Your authentication request appears to be coming from a bot\n' +
'Please log in using your API key (https://bitwarden.com/help/article/cli/#using-an-api-key)');
}
if (response.twoFactor) {
let selectedProvider: any = null;
const twoFactorProviders = this.authService.getSupportedTwoFactorProviders(null);