Two-Factor Status
Display current 2FA status
SaaSAuth
Overview
TwoFactorStatus shows whether two-factor authentication is enabled or disabled for a user account. When enabled, it displays the method, enrollment date, last verification, and remaining recovery codes count. It supports mandatory 2FA mode (enforced by the organization), disable confirmation, loading states, and custom labels for i18n.
Usage
import { TwoFactorStatusComponent } from "@leanicon/web-builder-library/saas";
<TwoFactorStatusComponent
status={{
isEnabled: true,
method: "totp",
enabledAt: new Date("2024-01-15"),
remainingRecoveryCodes: 6,
}}
onDisable={() => handleDisable2FA()}
/>;Variants
Enabled
Two-Factor Authentication
Enabled
Enabled since Sep 2, 2026
Last verified Sep 30, 2026
6 recovery codes remaining
Disabled
Two-Factor Authentication
Disabled
Enabled (Mandatory)
Two-Factor Authentication
Enabled
Enabled since Aug 3, 2026
8 recovery codes remaining
Two-factor authentication is required by your organization
Disabled (Mandatory)
Two-Factor Authentication
Disabled
Two-factor authentication is required by your organization
Low Recovery Codes
Two-Factor Authentication
Enabled
Enabled since Jul 4, 2026
Last verified Oct 1, 2026
2 recovery codes remaining
Disabling
Two-Factor Authentication
Enabled
Enabled since Sep 2, 2026
6 recovery codes remaining
Read Only
Two-Factor Authentication
Enabled
Enabled since Sep 2, 2026
6 recovery codes remaining
With Custom Labels
Autenticacion de dos factores
Desactivado
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
status | TwoFactorStatus | — | Yes | |
isMandatory | boolean | false | No | |
onEnable | (() => void) | — | No | |
onDisable | (() => void) | — | No | |
isDisabling | boolean | false | No | |
labels | TwoFactorStatusLabels | — | No | |
locale | string | en-US | No | |
className | string | — | No |