mirror of
https://github.com/bitwarden/jslib
synced 2025-12-19 01:33:22 +00:00
Update client code to use new interfaces
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user