elgentos / frontend2fa

elgentos/frontend2fa

Magento 2 Frontend 2FA implementation

magento2-module Compatibility: Not yet tested Code Quality: Fail Tests: N/A Security: Pass MIT

Are you the maintainer of elgentos?

Packagento pulls elgentos's Composer packages from the public registry so buyers can find them here.

Claim the namespace to take ownership, publish new releases directly, and start charging for premium versions.

Claim this namespace →

Elgentos_Frontend2FA

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

No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
1.2.0 stable Fail Not yet tested Details 2026-02-09 13:47:13
1.1.0 stable Not tested Not yet tested Details 2025-06-16 09:38:17
1.0.1 stable Not tested Not yet tested Details 2025-04-10 12:24:56
1.0.0 stable Not tested Not yet tested Details 2024-03-20 12:46:48
0.1.11 stable Not tested Not yet tested Details 2021-11-19 14:02:31
0.1.10 stable Not tested Not yet tested Details 2021-08-18 10:00:40
0.1.9 stable Not tested Not yet tested Details 2021-03-03 10:42:13
0.1.8 stable Not tested Not yet tested Details 2019-03-20 10:17:51
0.1.7 stable Not tested Not yet tested Details 2019-03-19 09:03:16
0.1.6 stable Not tested Not yet tested Details 2019-03-19 08:39:12
0.1.5 stable Not tested Not yet tested Details 2019-03-19 08:34:38
0.1.4 stable Not tested Not yet tested Details 2019-03-08 14:14:39
0.1.3 stable Not tested Not yet tested Details 2019-03-06 13:28:22
0.1.1 stable Not tested Not yet tested Details 2019-03-06 13:24:36
0.1.2 stable Not tested Not yet tested Details 2019-03-06 13:24:36
0.1.0 stable Not tested Not yet tested Details 2019-03-06 13:05:25

Requires 2

Package Constraint
juashyam/authenticator dev-master
endroid/qr-code ^6

Compatibility

Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 not tested not tested
2.4.8 not tested not tested
2.4.9 not tested not tested

Code Quality

Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.

Static analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

Static analysis results
Tool Status Findings Summary
PHPCS Fail 114 4 errors, 110 warnings (ruleset: Magento2) — 58 auto-fixable with phpcbf
PHPMD Pass 0
Cpd Warning 1 1 duplicated chunk spanning 32 total lines (min-lines=5, min-tokens=70)
Composer validate Pass 0

PHPStan

Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Error Error
2.4.8 Error Error
2.4.9 Error Error

Tests

Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.

Unit tests

Unit tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Integration tests

Integration tests results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 N/A N/A
2.4.8 N/A N/A
2.4.9 N/A N/A

Security

Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.

Security results
Tool Status Findings Summary
Composer audit Pass 0
Malware scan Pass 0
License
MIT

More from elgentos

View vendor
Make it pay

Turn an existing module into recurring revenue.

If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.