fiko / magento2-customer-two-factor-auth
2 factor authentication for Customer
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
Type:magento2-module
Requires
- christian-riesen/base32: ^1.3
- endroid/qr-code: *
- magento/framework: *
- magento/module-customer: *
- spomky-labs/otphp: ^10.0
This package is auto-updated.
Last update: 2025-02-16 03:31:38 UTC
README
It's a magento 2 module to enable two factor authentication for customer to secure their login step.
How to install?
Via Composer
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
Manually
- 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
How to use?
Customer Guide
1. Enable Two Factor Authentication
- 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.
2. Disable Two Factor Authentication
- 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.
Admin Guide
1. Generate Secret Key
- 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
.
2. Enable Two Factor Authentication
- 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.
3. Disable Two Factor Authentication
- Login onto adminhtml.
- Customers > All Customers.
- Edit one of the customer.
- Go to
Account Information
tab. - Check
Disable 2FA
field. - Save and try login.
Contributing
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.
License
MIT © 2022