Search

Mar 29, 2023

Cannot login in admin page via 2FA after upgrading magento from 2.3 to 2.4

We are upgrading magento version from 2.3.4 to 2.4.3 and we can not login to admin page.

We setup 2FA Google with below steps:

1. Go to server and run command
bin/magento config:set twofactorauth/general/force_providers google
2. bin/magento config:set twofactorauth/google/otp_window 60
3. Generate key from https://emn178.github.io/online-tools/base32_encode.html
4. Set the key for all admin user
bin/magento security:tfa:google:set-secret admin XXX-OUR-KEY
5. Go to admin page
6. Login with user and pass.
7. The actual result: The form is reloaded again
8. The expected result: 2FA input will be show 


SOLUTION:

1. increase the value to 600000 or above if required further eg:

bin/magento config:set system/security/max_session_size_admin 600000

2. Flush Cache.


No comments:

Post a Comment