Skip to content

[Due for payment 2026-03-30] [Domain Control] [Release 4] [FE] Hide member-level "Force two-factor authentication" toggle when domain 2FA is not enabled #85208

@mountiny

Description

@mountiny

Problem

On the Domain Member details page, there is a per-member "Force two-factor authentication" toggle that controls whether a specific member is in the twoFactorAuthExemptEmails list. This toggle is currently shown unconditionally — even when the domain itself does not require 2FA (twoFactorAuthRequired is false).

When the domain does not have 2FA enabled, this per-member toggle is misleading: toggling it ON does not actually force the member to use 2FA. The member-level toggle only controls exemptions from the domain-level requirement, so it has no effect when there is no domain-level requirement to be exempt from.

This was confirmed in OldDot as well — the toggle exists but has no functional impact when the domain 2FA setting is off.

Related test case: #84809 (comment) (see "Enable 2FA for Specific Member" section)

Proposal

Hide the per-member "Force two-factor authentication" toggle row on the Domain Member details page when domainSettings.twoFactorAuthRequired is falsy.

The fix is in src/pages/domain/Members/DomainMemberDetailsPage.tsx — wrap the ToggleSettingOptionRow (lines 145-165) in a conditional:

{!!domainSettings?.twoFactorAuthRequired && (
    <ToggleSettingOptionRow
        ...
    />
)}

The domainSettings object is already fetched in this component, so no additional data fetching is needed.

Issue OwnerCurrent Issue Owner: @ZhenjaHorbach
Issue OwnerCurrent Issue Owner: @war-in

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionTaskWeeklyKSv2

Type

No type

Projects

Status

HIGH

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions