0

I have upgraded to Magento2.4.2-p1, and I am not able to log in to admin. It is redirecting to the denied controller. Check screenshot enter image description here

1
0

Try disabling 2FA:

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

From 2.4, 2FA is required for Admin login: https://devdocs.magento.com/guides/v2.4/security/two-factor-authentication.html

You might have some other issues because it doesnt look like you are loading in Javascript / CSS / HTML.

9
  • That I have already done. but in magento2.4.2-p1 this is the issue if you disable 2FA from the config still it would not be disabled. Check this file Magento\TwoFactorAuth\Model\Tfa.php and check the function below. it is not picking up the value from config. Default it is setting as true public function isEnabled() { return true; } Jul 6 at 8:59
  • @KamalMittal I updated my answer - you need to disable it and then flush the config. Jul 6 at 9:07
  • performed the steps but no luck Jul 6 at 9:35
  • @KamalMittal there is definitely something else happening here. Have you tried removing cookies from browser and visiting the admin page? (without pressing reload page, but just going to admin URL in another tab) Jul 6 at 9:40
  • There is some stuff happening with /pub folder in 2.4.2 release. I think they moved index.php into /pub folder and that requires some adjustments in nginx.conf or apache2 setup. Please see Release Notes: devdocs.magento.com/guides/v2.4/release-notes/… Jul 6 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.