elgentos/frontend2fa

Magento 2 Frontend 2FA implementation

Installs: 9 996

Dependents: 0

Suggesters: 0

Security: 0

Stars: 19

Watchers: 16

Forks: 15

Open Issues: 3

Type:magento2-module

pkg:composer/elgentos/frontend2fa

1.2.0 2026-02-09 13:46 UTC

README

This extension is based on Neyamtux_Authenticator, which offers 2FA for the backend.

Features

  • Ability to force frontend 2FA for specific customer groups;
  • 2FA is enforced for chosen customer groups meaning the customer has to either setup or authenticate before continuing after logging in;
  • All customers in any group can optionally set their own 2FA;
  • Open the customer in the backend to be able to reset the 2FA secret;
  • Dutch translation files;
  • Hyva theme support with Tailwind CSS templates.

Installation

composer require elgentos/frontend2fa
php bin/magento module:enable Elgentos_Frontend2FA
php bin/magento module:enable Neyamtux_Authenticator
php bin/magento setup:upgrade

Hyva Theme Support

This module includes Hyva-compatible templates that use Tailwind CSS classes. The Hyva templates are automatically loaded when a Hyva theme is active and provide the same functionality with Hyva's styling approach.

The following Hyva templates are included:

  • view/frontend/templates/hyva/setup.phtml - Two-Factor Authentication setup page
  • view/frontend/templates/hyva/authenticate.phtml - Two-Factor Authentication login page

The templates are responsive and use Tailwind utility classes for styling.

Integration with other authentication systems

To bypass the 2FA requirement for a specific logged in user, for example if you are using a Single Sign-On system for certain users, set this value in their customer session:

$customerSession->set2faSuccessful(true);

Screenshots

Setup page (in My Account)

image

2FA authentication after logging in when setup is done

image

Configuration in backend

image

2FA reset button in backend

image

License

This project is licensed under the MIT License