How to Disable Magento 2 Two Factor Authentication

October 9, 2020
By Cozmot

Magento 2.4 enables two-factor authentication by default. Earlier, Magento 2 did offer an option to install two-factor authentication. The store owner can enable or disable the Magento 2 2FA as per the requirements. However, if you have downloaded the latest Magento 2 version and installed it, you might have noticed that the two-factor authentication cannot be disabled. Though it is not recommended to disable 2FA in Magento 2 for security purpose, you may want to still do it for multiple reasons:

  • Testing environment
  • The store is in the development stage
There is no option to disable Magento 2 two factor authentication in Magento 2.4 and hence Mark Shust, a certified Magento developer from Cleveland, Ohio has developed a module to disable Magento 2 two factor authentication. His module adds the toggle to enable and disable 2FA from the Magento 2 admin panel. When you install this module, 2FA is enabled by default in order to prevent any side effects or security loopholes from being introduced during automated installation processes. To disable it, the admin has to navigate to Stores > Configuration. Under Security, selecting 2FA, expand General section and set “Enable 2FA” to No.

Method to disable Magento 2 two factor authentication:

Create config.xml Create di.xml Create module.xml Create system.xml Create BypassTwoFactorAuth.php Create registration.php: Create composer.json: That’s it. You can also enable or disable 2FA from the command line using the below command: Any doubts in the method to disable two-factor authentication in Magento 2.4 can be mentioned in the Comments section below. I’d be happy to help. Also, do share the post with the Magento Community via social media. Thank you.]]>

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!