4

After upgrading my Magento 2.4.5 to Magento 2.4.6, I can't disable the 2FA extension in my local environment anymore.

This is the error that appeared.

Unable to change status of modules because of the following constraints: Cannot disable Magento_TwoFactorAuth because modules depend on it: Magento_AdminAdobeImsTwoFactorAuth: Magento_AdminAdobeImsTwoFactorAuth->Magento_TwoFactorAuth 

Magento 2.4.6 disabling 2fa

How could I solve it?

1
  • Try this command :- bin/n98-magerun2 module:disable Magento_AdminAdobeImsTwoFactorAuth->Magento_TwoFactorAuth Commented Mar 16, 2023 at 7:37

7 Answers 7

11

You need to disable the new dependent module.

bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth 
1

My choice - to create On/Off checkbox in Admin panel. I really don't understand why it is not built-in feature.

Install this module or just copy code to your own repo: https://github.com/mygento/two-factor-auth

It's better solution - if you have several envs - you can easily enable 2FA on Prod and disable on other - without changes in config.php (enabling/disabling core module)

0

You may run the following command:

bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth 
0

You can run the command and disable both module

bin/n98-magerun2 module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth 
0

first, you need to run the below command to disable Two Factor Authentication and run the setup upgrade and di compile command. Finally, clear the cache.

php bin/n98-magerun2 module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth php bin/n98-magerun2 setup:upgrade php bin/n98-magerun2 setup:di:compile php bin/n98-magerun2 cache:clean php bin/n98-magerun2 cache:flush 
0

The following commands were successful in disabling two Magento modules on Windows 10 xampp:

php bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth 

After this I have encountered error "Unable to unserialize value, string is corrupted.", to resolve the error the Elastic Search was restarted. Afterward, some pages displayed incorrectly with CSS and showed a 404 page not found error. To address this issue, the following commands were executed:

php bin/magento indexer:reindex php bin/magento setup:upgrade php bin/magento setup:static-content:deploy -f php bin/magento cache:flush 

It is hoped that the above commands will be helpful to someone encountering similar issues.

0

need to run the below command

Step-1

bin/magento module:disable Magento_AdminAdobeImsTwoFactorAuth Magento_TwoFactorAuth 

Step-2

php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:clean php bin/magento cache:flush 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.