cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4 asking for twofactor Authentication to login to admin

SOLVED

Magento 2.4 asking for twofactor Authentication to login to admin

Hi

    I install 2.4 with ES on my Ubuntu local machine and everything went just fine  till i tried to login to my admin . it showed " Failed to send the message " and you want to configure two-factor Authentication in order to proceed to store's admin area . An E-mail was sent to you with further instructions  . But as it is a local machine is not configured to send mail and i wont get it . I tried to create a new user from command line but result is the same . Is there a way to bypass it  ?  

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Magento 2.4 asking for twofactor Authentication to login to admin

If your email sending is not setup, then you can also disable TwoFactor Authentication

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

Please let me know if you have more issues.

View solution in original post

7 REPLIES 7

Re: Magento 2.4 asking for twofactor Authentication to login to admin

If your email sending is not setup, then you can also disable TwoFactor Authentication

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

Please let me know if you have more issues.

View solution in original post

Re: Magento 2.4 asking for twofactor Authentication to login to admin

Thank you so much for the help  !!  I had to do 

setup:di:compile 

too and it is working fine now   ........  there is one more problem i am facing  ........... i am trying to deploy sample data and  it is showing `./composer.json is not writable.`  Do you have any idea on what had gone wrong ? 

Re: Magento 2.4 asking for twofactor Authentication to login to admin

I think issue is user permission issue, Please check owner of 'composer.json'

ls -lh ~/.composer/composer.json

you can change it if other than current user

sudo chown -R <Magento file system owner>:<Magento file system owner> ~/.composer/composer.json

Please refer to https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-sys-perms-over.html

 

Re: Magento 2.4 asking for twofactor Authentication to login to admin

There is no .composer folder in my home directory   ............ the composer.json file is in the magento root folder 

Re: Magento 2.4 asking for twofactor Authentication to login to admin

Please share response of

ls -lh composer.json

 

Re: Magento 2.4 asking for twofactor Authentication to login to admin

I was able to get through it but now it is showing another error  ..........  ` In PluginManager.php(196) : eval()'d code line 188:  chmod(): Operation not permitted `  . 

Re: Magento 2.4 asking for twofactor Authentication to login to admin

When I try and disable, it says Permission Denied