Two-Factor Authentication
The Magento Admin provides all access to your store, orders, and customer data. To further increase security to your Magento instance, Magento Two-Factor Authentication (2FA) adds support for two-step authentication for multiple providers. When enabled, users attempting to access the Admin must complete a second step to verify their account. All features and requirements are restricted to Admin user accounts, not extended to customer accounts.
Step 1: Enable 2FA and Supported Providers
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Security and choose 2FA.
Enable 2FA for the Admin
-
Expand () the General section, if necessary, and set Enable Two Factor Auth to
Yes
. -
(Optional) For Force Providers, select the authenticators you require for all users.
To allow users to select their own authenticator, do not select an option.
-
Enable and configure each authentication provider that you support.
-
When complete, click Save Config.
Each enabled authenticator becomes a supported option for user accounts.
Google Authenticator
-
Enable this provider — Set to
Yes
. -
(Optional) Enable “trust this device” option — Set to one of the following:
Yes
— The user does not have to enter their authenticator code for every login per device.No
— Forces authentication for every login.
Google Authenticator
U2F Devices (Yubikey and others)
-
Enable this provider — Set to
Yes
. -
(Optional) Enable “trust this device” option — Set to one of the following:
Yes
— The user does not have to enter their authenticator code for every login per device.No
— Forces authentication for every login.
U2F Devices
Duo Security
-
Enable this provider — Set to
Yes
. -
(Optional) Enable “trust this device” option — Set to one of the following:
Yes
— The user does not have to enter their authenticator code for every login per device.No
— Forces authentication for every login.
-
Enter the following keys for your account:
- Integration key
- Secret key
-
Enter the API hostname.
Duo Security
Authy
-
Enable this provider — Set to
Yes
. -
Enter the API key for your Authy account.
-
(Optional) Enable “trust this device” option — Set to one of the following:
Yes
— The user does not have to enter their authenticator code for every login per device.No
— Forces authentication for every login.
-
(Optional) To change the OneTouch Message, clear the Use system value checkbox. Then, enter the message that you want to use.
Authy
Step 2: Configure Required Authenticator Provider
You must choose at least one authenticator supported per user account, or force an authenticator globally for all accounts. We recommend setting or forcing only one authenticator for the Magento Admin. If you select multiple authenticators, the user must input tokens for all selections.
- Set required authenticators per user account—Supports multiple types of authenticators and allows you to set an authenticator per account depending on user or office needs.
- Force global authenticator for all accounts—Strictly requires all Magento Admin users to access using the selected authenticator(s).
Set required authenticators per user account
With one or more authenticators enabled for the Magento Admin, you can require one or more authenticators per Admin user account. For this option, keep Use system value selected for Force providers and enable/configure supported authenticator providers.
We recommend only enabling one authenticator per account. If you require multiple authenticators, the user must authenticate with each one. For example, if you select Google and U2F, the user must access with a Google Authenticator code and connect a U2F device.
-
On the Admin sidebar, go to Stores > Settings > All Users.
-
Do one of the following:
- Select and edit a user from the list.
- Add a new user account.
-
In the User Information menu, select 2FA.
-
On the page, select the checkbox of the authenticator that you want to require for the user account.
The list includes all enabled and configured authenticator providers.
-
When complete, click Save User.
Enable 2FA for User
Force global authenticator for all accounts
This option requires all Admin users to configure and use all forced authenticators to access the Magento Admin. We recommend that you assign one authenticator to be forced.
-
On the Admin sidebar, go to Stores > Settings > Configuration.
-
In the left panel, expand Security and choose 2FA. Then, do the following:
-
In the General section, clear the Use system value checkbox for Force providers.
-
Select one or more authenticators.
-
-
When complete, click Save Config.
Force providers for all user accounts