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
1 Answer
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.
-
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; } Commented Jul 6, 2021 at 8:59
-
@KamalMittal I updated my answer - you need to disable it and then flush the config. Commented Jul 6, 2021 at 9:07
-
-
@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) Commented Jul 6, 2021 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/… Commented Jul 6, 2021 at 9:44