Add Phone as a Second Factor

On this page
Starter plan required

This feature requires at least a Starter plan.

Available since 1.26.0

With the phone method, FusionAuth sends a one-time code to the user's phone at login. FusionAuth sends the code by SMS, or by a voice call in 1.65.0 and later.

Enable the Phone Method on the Tenant#

FusionAuth doesn't enable the phone method by default. The phone method needs a messenger. For more information, see Messengers.

To enable the phone method:

  1. Navigate to Tenants -> Edit Tenant -> Multi-Factor .

  2. Turn on Enable SMS MFA, Enable voice MFA, or both.

  3. For each enabled message type, select a messenger and a template. FusionAuth ships with default templates that you can customize. An Application can override the templates on its Multi-Factor tab.

    The tenant Multi-Factor tab with the Phone settings highlighted.

Add a Phone on the Account Pages#

  1. On the account page, click Manage two-factor .

    The account page with the edit button and the two-factor and passkey links.
  2. Click Add two-factor .

    The two-factor page with no methods configured.
  3. Select Phone.

    The Enable two-factor form for a phone.
  4. Enter a phone number.

  5. When the tenant enables both SMS and voice, select the message type.

  6. Click Send a one-time code .

  7. Optionally, enter a name for the method, such as Work phone.

  8. Enter the code from the message.

  9. Click Enable .

Recovery Codes#

When the method is the user's first MFA method, FusionAuth shows recovery codesA code used to regain access to an account when the user loses their multi-factor authentication factors.. Save the recovery codes in a safe place.

The recovery codes shown after two-factor authentication is enabled.

Log In with a Phone#

After the user enters a password at the next login, FusionAuth sends a code to the phone and asks for the code. When the tenant enables both SMS and voice, the user chooses the message type first.

The two-factor challenge for a code that FusionAuth sent, shown after logging in.