Check out our video tutorial on setting up Multi-Factor Authentication!
Multi-factor authentication adds an extra level of protection to the Control Panel by relying on one-time password generated by Multi-factor authentication applications like Google Authenticator, Microsoft Authenticator or Authy.
Users with Control Panel access can enable/disable Multi-factor authentication via their profile in the Control Panel.
Multi-Factor Authentication can also be set as required for certain Member Roles
Members with a primary role where this option is enabled will be required to use MFA to log in via a front-end login form or when accessing the Control Panel (if allowed access).
Members who still need to set up MFA are sent to the enrollment page after entering their password. Scan the QR code with an authenticator app, then enter the six-digit code to complete setup. The Control Panel enrollment page and QR code remain available to members who are required to enroll when the site cannot verify its Pro license.
Setting up Multi-Factor Authentication on the front-end is handled using a set of system dialogs. These dialogs can be triggered manually using the links provided by the {exp:member:mfa_links} tag.
The dialogs are presented using Multi-Factor Authentication Template from System Message Templates. You can also use a custom template from the system_messages template group, it should be named mfa_template. Include {content} in the custom template to render the MFA form and its current fields.
If you lose access to your authenticator, sign in with your password and select Reset at the MFA prompt. Enter the backup code you saved during setup. Resetting turns off MFA for your account. Enroll your new device when prompted, or from your profile when Pro settings are available.
An enrolled member can use a backup code in the Control Panel even when the site cannot verify its Pro license.
To disable MFA for your own account, sign in and enter a current six-digit code from your authenticator when prompted. In the Control Panel, you may also be asked to confirm your password if your recent authentication has expired. The front-end disable form requires both your password and the code.
If you manage MFA for another member in the Control Panel, use your own credentials when ExpressionEngine asks you to confirm your identity.
This tag is providing links to help people manage their MFA settings.
{exp:member:mfa_links}
{if mfa_enabled}
<a href="{disable_mfa_link}">Disable MFA</a>
{if:else}
<a href="{enable_mfa_link}">Enable MFA</a>
{/if}
{/exp:member:mfa_links}
return="member"
URL to return to. Defaults to current page.
Invoke dialog to set up multi-factor authentication, if it's not enabled for member..
Invoke dialog to disable multi-factor authentication. Only available is member is logged in and authenticated with MFA.
In ExpressionEngine 7.6 and later, mfa_session_length lets members reuse a successful MFA verification on the same browser, hostname, and site. Set the length in seconds in system/user/config/config.php. Reuse is disabled when the setting is omitted or set to 0.
This works with cookie-backed sessions in the Control Panel and on the front end, including a login restored by Remember Me. It also works when a member confirms their password to unlock the Control Panel. The verification window starts when the member verifies their MFA code. Activity and subsequent logins within the window do not extend it.
When the window expires, the member can continue using their current session. The next authentication that requires MFA asks for a new code. Signing out revokes the applicable approval. Changing the member's password or MFA settings revokes their remembered approvals.

