markshust / docker-magento

Mark Shust's Docker Configuration for Magento
https://m.academy/courses/set-up-magento-2-development-environment-docker/
MIT License
2.52k stars 993 forks source link

Automated Setup improvement - Backend Login issue #1204

Open postadelmaga opened 1 month ago

postadelmaga commented 1 month ago

Because of the below issue the automatic setup required some manual step in order to access the back-end

Description After installing the environment, I tried to access the back-end and I got 2 issues:

  1. I cannot find the credential in the guide, I think it would be a good idea to specify them in the installation guide
  2. a 2 factor authentication is required

Steps To Reproduce

  1. run Automated Setup Magento 2.4.7 community
  2. open backend https://magento.test/admin
  3. log in using default authentication user: john.smith, password: password123
  4. You need to configure Two-Factor message is displayed ( mail is set to john.smith@gmail.com )

Suggestion

  1. Allow an extra parameter in the automatic Automated Setup that allow to specify a real email address
  2. Disable the 2 factor authentication during installation
YevhenZvieriev commented 1 month ago

Hi, @postadelmaga

Thank you for reporting this issue. We will work on incorporating these changes and update the documentation accordingly. How you can address the concerns you’ve raised:

  1. Credentials in Installation Guide:

Honestly, I never use the default authentication user, I always create an admin user using the bin/magento admin:user:create script, so you always can use this way to create a new admin user, or use my script, which utilizes the bin/magento admin:user:create command with predefined values for the admin user. Recently, this feature was removed, so you must use the script as it is in the PR. But we understand the importance of having the credentials readily available. I will update the installation guide to include default credentials and detailed instructions for accessing the back end.

  1. Two-Factor Authentication:

    I have suggested @markshust to enhance Magento setup to disabling 2FA during the installation process for a smoother setup experience, but we have not reached a final decision

Feel free to check it now: https://github.com/markshust/docker-magento/discussions/1091

If you have any suggestions, please let me know :)

But for now, you can disable the two-factor authentication after installation as follows:

Just disable these modules: bin/magento module:disable {Magento_TwoFactorAuth,Magento_AdminAdobeImsTwoFactorAuth}

Or install this Mark Shust`s extension https://github.com/markshust/magento2-module-disabletwofactorauth

FYI: The Magento_TwoFactorAuth module depends on Magento_AdminAdobeImsTwoFactorAuth. So you should disable the AdminAdobeImsTwoFactorAuth module before Magento_TwoFactorAuth.

postadelmaga commented 1 month ago

Thanks, I noted also phpmyadmin (http://localhost:8080 ) password (magento/magento) are not indicated in the guide.

YevhenZvieriev commented 1 month ago

Honestly, I never use phpmyadmin, GUI of PHPStorm works very well for me.

But if you need this, why not add this to README? :)