mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
Remove showPasswordless conditionals (#11928)
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
"allowedHosts": "auto"
|
||||
},
|
||||
"flags": {
|
||||
"showPasswordless": false,
|
||||
"sdk": true
|
||||
},
|
||||
"devFlags": {}
|
||||
|
||||
@@ -16,7 +16,5 @@
|
||||
"proxyEvents": "https://events.bitwarden.com",
|
||||
"proxyNotifications": "https://notifications.bitwarden.com"
|
||||
},
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
}
|
||||
"flags": {}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
},
|
||||
"flags": {},
|
||||
"devFlags": {}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,5 @@
|
||||
"businessId": "4ZDA7DLUUJGMN",
|
||||
"buttonAction": "https://www.paypal.com/cgi-bin/webscr"
|
||||
},
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
}
|
||||
"flags": {}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
}
|
||||
"flags": {}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
}
|
||||
"flags": {}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,5 @@
|
||||
"proxyNotifications": "http://localhost:61841",
|
||||
"port": 8081
|
||||
},
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
}
|
||||
"flags": {}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,5 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"flags": {
|
||||
"showPasswordless": true
|
||||
}
|
||||
"flags": {}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
|
||||
|
||||
import { RouterService } from "../../../../../../../../apps/web/src/app/core";
|
||||
import { flagEnabled } from "../../../../../utils/flags";
|
||||
import { AcceptOrganizationInviteService } from "../../../organization-invite/accept-organization.service";
|
||||
|
||||
import { WebLoginComponentService } from "./web-login-component.service";
|
||||
@@ -73,18 +72,6 @@ describe("WebLoginComponentService", () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
|
||||
describe("isLoginViaAuthRequestSupported", () => {
|
||||
it("returns true if showPasswordless flag is enabled", () => {
|
||||
(flagEnabled as jest.Mock).mockReturnValue(true);
|
||||
expect(service.isLoginViaAuthRequestSupported()).toBe(true);
|
||||
});
|
||||
|
||||
it("returns false if showPasswordless flag is disabled", () => {
|
||||
(flagEnabled as jest.Mock).mockReturnValue(false);
|
||||
expect(service.isLoginViaAuthRequestSupported()).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe("getOrgPolicies", () => {
|
||||
it("returns undefined if organization invite is null", async () => {
|
||||
acceptOrganizationInviteService.getOrganizationInvite.mockResolvedValue(null);
|
||||
|
||||
@@ -16,7 +16,6 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
|
||||
|
||||
import { flagEnabled } from "../../../../../utils/flags";
|
||||
import { RouterService } from "../../../../core/router.service";
|
||||
import { AcceptOrganizationInviteService } from "../../../organization-invite/accept-organization.service";
|
||||
|
||||
@@ -47,10 +46,6 @@ export class WebLoginComponentService
|
||||
this.clientType = this.platformUtilsService.getClientType();
|
||||
}
|
||||
|
||||
isLoginViaAuthRequestSupported(): boolean {
|
||||
return flagEnabled("showPasswordless");
|
||||
}
|
||||
|
||||
async getOrgPolicies(): Promise<PasswordPolicies | null> {
|
||||
const orgInvite = await this.acceptOrganizationInviteService.getOrganizationInvite();
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="tw-mb-3" *ngIf="showLoginWithDevice && showPasswordless">
|
||||
<div class="tw-mb-3" *ngIf="showLoginWithDevice">
|
||||
<button
|
||||
bitButton
|
||||
type="button"
|
||||
|
||||
@@ -32,7 +32,6 @@ import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { ToastService } from "@bitwarden/components";
|
||||
import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legacy";
|
||||
|
||||
import { flagEnabled } from "../../../utils/flags";
|
||||
import { RouterService } from "../../core";
|
||||
import { AcceptOrganizationInviteService } from "../organization-invite/accept-organization.service";
|
||||
import { OrganizationInvite } from "../organization-invite/organization-invite";
|
||||
@@ -46,7 +45,6 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit {
|
||||
showResetPasswordAutoEnrollWarning = false;
|
||||
enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;
|
||||
policies: Policy[];
|
||||
showPasswordless = false;
|
||||
|
||||
constructor(
|
||||
private acceptOrganizationInviteService: AcceptOrganizationInviteService,
|
||||
@@ -98,7 +96,6 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit {
|
||||
toastService,
|
||||
);
|
||||
this.onSuccessfulLoginNavigate = this.goAfterLogIn;
|
||||
this.showPasswordless = flagEnabled("showPasswordless");
|
||||
}
|
||||
|
||||
submitForm = async (showToast = true) => {
|
||||
|
||||
@@ -8,9 +8,7 @@ import {
|
||||
|
||||
// required to avoid linting errors when there are no flags
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export type Flags = {
|
||||
showPasswordless?: boolean;
|
||||
} & SharedFlags;
|
||||
export type Flags = {} & SharedFlags;
|
||||
|
||||
// required to avoid linting errors when there are no flags
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
|
||||
Reference in New Issue
Block a user