Magento 2.4, the powerful e-commerce platform, comes equipped with robust security features, including Two-Factor Authentication (2FA).

While 2FA enhances the protection of user accounts, there might be scenarios where merchants or administrators prefer to disable this module.

Whether it’s for internal testing purposes or to align with specific security practices, disabling 2FA in Magento 2.4 is a straightforward process.

In this article, we will guide you through the steps to disable the Two-Factor Authentication module, ensuring a seamless experience for your Magento store administrators.

By Backend Dashboard:

Step 1: Log in to Your Magento Admin Panel

To initiate the process, log in to your Magento Admin Panel using your administrator credentials. Ensure that you have the necessary permissions to access and modify the system configuration.

Step 2: Access the Two-Factor Authentication Settings

Once you are logged in, navigate to the “Stores” tab in the left-hand sidebar and select “Configuration” from the drop-down menu. Under the “Advanced” section, click on “Admin” to access the “Security” settings.

Step 3: Disable Two-Factor Authentication

In the “Security” settings, you will find the “Two-Factor Authentication” section. Here, you will see an option to “Enable Two-Factor Authentication.” By default, this option is enabled.

To disable the Two-Factor Authentication module, simply uncheck the box next to “Enable Two-Factor Authentication.” Once you have done this, Magento will prompt you to save the configuration changes.

Step 4: Save Configuration and Clear Cache

After disabling the Two-Factor Authentication module, click on the “Save Config” button to apply the changes. Magento will process the configuration update, and you’ll see a success message confirming the changes.

To ensure that the changes take effect, it is recommended to clear the cache. To do this, go to the “System” tab in the top navigation menu, select “Cache Management,” and then click on the “Flush Magento Cache” button.

Step 5: Verify the Changes

To confirm that the Two-Factor Authentication module has been successfully disabled, log out of your Magento Admin Panel and log back in using your administrator credentials. You should no longer be prompted to enter a Two-Factor Authentication code during the login process.

By Command line:

For disable the 2fa, please run below command in terminal Magento root path :

bin/magento module:disable Magento_TwoFactorAuth
bin/magento cache:flush 


Disabling the Two-Factor Authentication module in Magento 2.4 is a simple and straightforward process that allows merchants and administrators to tailor the security settings of their Magento store to meet specific requirements. While 2FA enhances the protection of user accounts, there are valid reasons to disable it temporarily or permanently. By following the steps outlined in this article, you can seamlessly disable the Two-Factor Authentication module, ensuring a smooth experience for your Magento store administrators. Always remember to re-enable this essential security feature if required for enhanced account protection.

Pin It on Pinterest

Share This