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)) {
|
||||
return;
|
||||
} else if (response.twoFactor) {
|
||||
} else if (response.requiresTwoFactor) {
|
||||
if (this.onSuccessfulLoginTwoFactorNavigate != null) {
|
||||
this.onSuccessfulLoginTwoFactorNavigate();
|
||||
} else {
|
||||
|
||||
@@ -178,7 +178,7 @@ export class SsoComponent {
|
||||
orgIdFromState
|
||||
);
|
||||
const response = await this.formPromise;
|
||||
if (response.twoFactor) {
|
||||
if (response.requiresTwoFactor) {
|
||||
if (this.onSuccessfulLoginTwoFactorNavigate != null) {
|
||||
this.onSuccessfulLoginTwoFactorNavigate();
|
||||
} else {
|
||||
|
||||
@@ -216,7 +216,7 @@ export class LoginCommand {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (response.twoFactor) {
|
||||
if (response.requiresTwoFactor) {
|
||||
let selectedProvider: any = null;
|
||||
const twoFactorProviders = this.twoFactorService.getSupportedProviders(null);
|
||||
if (twoFactorProviders.length === 0) {
|
||||
@@ -291,7 +291,7 @@ export class LoginCommand {
|
||||
});
|
||||
}
|
||||
|
||||
if (response.twoFactor) {
|
||||
if (response.requiresTwoFactor) {
|
||||
return Response.error("Login failed.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user