Learn how to easily disable the Two Factor Authentication Module of Magento 2.

How to disable Magento 2 2FA plugin

As a security measure, it's a pretty good idea to have the module enabled by default once your store is up and running. However, you will always need to disable it at the beginning when you are configuring your store for first time. If you try to login for the first time as admin and the module is enabled, you won't be able to login because you will get the message that an email has been sent to your account to confirm the login attempt.

You can easily disable a magento's module using the module:disable command. To disable the Two Factor Authentication module, use the following command:

php bin/magento module:disable Magento_TwoFactorAuth

After disabling the module, be sure to clear the cache with:

php bin/magento cache:flush

After clearing the cache, be sure to run the single-tenant compiler:

php bin/magento setup:di:compile

Happy coding ❤️!


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors