diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 0f3a3e9fcd..7f8ca7735e 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -1,6 +1,4 @@ export enum FeatureFlag { - DisplayLowKdfIterationWarningFlag = "display-kdf-iteration-warning", - Fido2VaultCredentials = "fido2-vault-credentials", TrustedDeviceEncryption = "trusted-device-encryption", PasswordlessLogin = "passwordless-login", AutofillV2 = "autofill-v2", diff --git a/libs/common/src/vault/services/fido2/fido2-client.service.spec.ts b/libs/common/src/vault/services/fido2/fido2-client.service.spec.ts index 1aab00752e..670d623d9f 100644 --- a/libs/common/src/vault/services/fido2/fido2-client.service.spec.ts +++ b/libs/common/src/vault/services/fido2/fido2-client.service.spec.ts @@ -42,7 +42,6 @@ describe("FidoAuthenticatorService", () => { stateService = mock(); client = new Fido2ClientService(authenticator, configService, authService, stateService); - configService.getFeatureFlag.mockResolvedValue(true); configService.serverConfig$ = of({ environment: { vault: VaultUrl } } as any); stateService.getEnablePasskeys.mockResolvedValue(true); authService.getAuthStatus.mockResolvedValue(AuthenticationStatus.Unlocked); @@ -225,16 +224,6 @@ describe("FidoAuthenticatorService", () => { await rejects.toBeInstanceOf(DOMException); }); - it("should throw FallbackRequestedError if feature flag is not enabled", async () => { - const params = createParams(); - configService.getFeatureFlag.mockResolvedValue(false); - - const result = async () => await client.createCredential(params, tab); - - const rejects = expect(result).rejects; - await rejects.toThrow(FallbackRequestedError); - }); - it("should throw FallbackRequestedError if passkeys state is not enabled", async () => { const params = createParams(); stateService.getEnablePasskeys.mockResolvedValue(false); @@ -405,16 +394,6 @@ describe("FidoAuthenticatorService", () => { await rejects.toBeInstanceOf(DOMException); }); - it("should throw FallbackRequestedError if feature flag is not enabled", async () => { - const params = createParams(); - configService.getFeatureFlag.mockResolvedValue(false); - - const result = async () => await client.assertCredential(params, tab); - - const rejects = expect(result).rejects; - await rejects.toThrow(FallbackRequestedError); - }); - it("should throw FallbackRequestedError if passkeys state is not enabled", async () => { const params = createParams(); stateService.getEnablePasskeys.mockResolvedValue(false); diff --git a/libs/common/src/vault/services/fido2/fido2-client.service.ts b/libs/common/src/vault/services/fido2/fido2-client.service.ts index 283a82ec59..836afdd1c9 100644 --- a/libs/common/src/vault/services/fido2/fido2-client.service.ts +++ b/libs/common/src/vault/services/fido2/fido2-client.service.ts @@ -3,7 +3,6 @@ import { parse } from "tldts"; import { AuthService } from "../../../auth/abstractions/auth.service"; import { AuthenticationStatus } from "../../../auth/enums/authentication-status"; -import { FeatureFlag } from "../../../enums/feature-flag.enum"; import { ConfigServiceAbstraction } from "../../../platform/abstractions/config/config.service.abstraction"; import { LogService } from "../../../platform/abstractions/log.service"; import { StateService } from "../../../platform/abstractions/state.service"; @@ -57,20 +56,9 @@ export class Fido2ClientService implements Fido2ClientServiceAbstraction { const serverConfig = await firstValueFrom(this.configService.serverConfig$); const isOriginEqualBitwardenVault = origin === serverConfig.environment?.vault; - if ( - !userEnabledPasskeys || - !isUserLoggedIn || - isExcludedDomain || - isOriginEqualBitwardenVault - ) { - return false; - } - - const featureFlagEnabled = await this.configService.getFeatureFlag( - FeatureFlag.Fido2VaultCredentials, + return ( + userEnabledPasskeys && isUserLoggedIn && !isExcludedDomain && !isOriginEqualBitwardenVault ); - - return featureFlagEnabled; } async createCredential(