1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-19 17:53:48 +00:00

Update client code to use new interfaces

This commit is contained in:
Thomas Rittson
2021-12-20 15:24:12 +10:00
parent 970b658c1f
commit 35d894223d
3 changed files with 4 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ export class LoginComponent extends CaptchaProtectedComponent implements OnInit
} }
if (this.handleCaptchaRequired(response)) { if (this.handleCaptchaRequired(response)) {
return; return;
} else if (response.twoFactor) { } else if (response.requiresTwoFactor) {
if (this.onSuccessfulLoginTwoFactorNavigate != null) { if (this.onSuccessfulLoginTwoFactorNavigate != null) {
this.onSuccessfulLoginTwoFactorNavigate(); this.onSuccessfulLoginTwoFactorNavigate();
} else { } else {

View File

@@ -178,7 +178,7 @@ export class SsoComponent {
orgIdFromState orgIdFromState
); );
const response = await this.formPromise; const response = await this.formPromise;
if (response.twoFactor) { if (response.requiresTwoFactor) {
if (this.onSuccessfulLoginTwoFactorNavigate != null) { if (this.onSuccessfulLoginTwoFactorNavigate != null) {
this.onSuccessfulLoginTwoFactorNavigate(); this.onSuccessfulLoginTwoFactorNavigate();
} else { } else {

View File

@@ -216,7 +216,7 @@ export class LoginCommand {
} }
} }
} }
if (response.twoFactor) { if (response.requiresTwoFactor) {
let selectedProvider: any = null; let selectedProvider: any = null;
const twoFactorProviders = this.twoFactorService.getSupportedProviders(null); const twoFactorProviders = this.twoFactorService.getSupportedProviders(null);
if (twoFactorProviders.length === 0) { if (twoFactorProviders.length === 0) {
@@ -291,7 +291,7 @@ export class LoginCommand {
}); });
} }
if (response.twoFactor) { if (response.requiresTwoFactor) {
return Response.error("Login failed."); return Response.error("Login failed.");
} }