It's a magento 2 module to enable two factor authentication for customer to secure their login step.
If you try to install via composer, just require your project to the module by running this command :
composer require fiko/magento2-customer-two-factor-auth
- Download this repo
- Create a Directory
app/code/Fiko/CustomerTwoFactorAuth
- Copy downloaded repo to this directory
Once you download it (both composer or manually), just run this commands to apply this module to your project :
php bin/magento setup:upgrade --keep-generated
php bin/magento setup:di:compile
- Login with customer account.
- Go to my account.
- Go to Account Security on sidebar.
- Enable Login Security.
- Scan the QR Code.
- Confirm the code.
- Try to logout and login back again.
- Login with customer account.
- Validate the OTP.
- Go to my account.
- Go to Account Security on sidebar.
- Disable Login Security.
- Input current password.
- Try to logout and login back again.
- Login onto adminhtml.
- Customers > All Customers.
- Edit one of the customer.
- Click
Generate 2FA Secret Key
. - Go to
Account Information
tab. - See field of
2FA Secret Key
.
- Login onto adminhtml.
- Customers > All Customers.
- Edit one of the customer.
- Go to
Account Information
tab. - Check
Enable 2FA
field (make sure the2FA Secret Key
is not empty. - Save the secret key and setup it on your authenticator app.
- Save and try login.
- Login onto adminhtml.
- Customers > All Customers.
- Edit one of the customer.
- Go to
Account Information
tab. - Check
Disable 2FA
field. - Save and try login.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT © 2022