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

Disabled (Mandatory)

Two-Factor Authentication

Disabled

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

NameTypeDefaultRequiredDescription
statusTwoFactorStatus—Yes
isMandatorybooleanfalseNo
onEnable(() => void)—No
onDisable(() => void)—No
isDisablingbooleanfalseNo
labelsTwoFactorStatusLabels—No
localestringen-USNo
classNamestring—No