Magento® 2 module force login customers
-
Go to Magento® 2 root directory
-
Enter following commands to install module:
composer require maxmage/forceloginWait while dependencies are updated.
-
Enter following commands to enable module:
php bin/magento module:enable MaxMage_ForceLogin php bin/magento setup:upgrade php bin/magento cache:clean
- Enable the Force Login module in Magento® Admin under Stores > Configuration > Customers > Force Login.