PHPackages                             magenxcommerce/module-two-factor-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. magenxcommerce/module-two-factor-auth

ActiveMagento2-module[Authentication &amp; Authorization](/categories/authentication)

magenxcommerce/module-two-factor-auth
=====================================

Two Factor Authentication module for Magento2

1.1.2(4y ago)021OSL-3.0PHPPHP ~7.3.0||~7.4.0

Since Oct 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/magenxcommerce/module-two-factor-auth)[ Packagist](https://packagist.org/packages/magenxcommerce/module-two-factor-auth)[ RSS](/packages/magenxcommerce-module-two-factor-auth/feed)WikiDiscussions 1.1.2 Synced 1w ago

READMEChangelog (4)Dependencies (15)Versions (8)Used By (1)

MSP TwoFactorAuth

Two Factor Authentication module for maximum **backend access protection** in Magento 2.

> Member of **MSP Security Suite**
>
> See: [https://github.com/magespecialist/m2-MSP\_Security\_Suite](https://github.com/magespecialist/m2-MSP_Security_Suite)

Did you lock yourself out from Magento backend? [click here.](https://github.com/magespecialist/m2-Magento_TwoFactorAuth#emergency-commandline-disable)

Main features:
--------------

[](#main-features)

- Providers:
    - Google authenticator
        - QR code enroll
    - Authy
        - SMS
        - Call
        - Token
        - One touch
    - U2F keys (Yubico and others)
    - Duo Security
        - SMS
        - Push notification
- Central security suite events logging
- Per user configuration
- Forced global 2FA configuration

Installing on Magento2:
-----------------------

[](#installing-on-magento2)

**1. Install using composer**

From command line:

`composer require msp/twofactorauth`

**2. Enable and configure from your Magento backend config**

Enable from **Store &gt; Config &gt; SecuritySuite &gt; Two Factor Authentication**.

[![](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/config.png)](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/config.png)

**3. Enable two factor authentication for your user**

You can select among a set of different 2FA providers. **Multiple concurrent providers** are supported.

[![](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/user_tfa.png)](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/user_tfa.png)

**4. Subscribe / Configure your 2FA provider(s):**

**4.1 Google Authenticator example**

[![](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/google_qr.png)](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/google_qr.png)

**4.2. Duo Security example**

[![](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/duo_auth.png)](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/duo_auth.png)

**4.3. U2F key (Yubico and others) example**

[![](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/u2f_auth.png)](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/u2f_auth.png)

**4.4. Authy example**

[![](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/authy_auth.png)](https://raw.githubusercontent.com/magespecialist/m2-Magento_TwoFactorAuth/master/screenshots/authy_auth.png)

Emergency commandline disable:
------------------------------

[](#emergency-commandline-disable)

If you messed up with two factor authentication you can disable it from command-line:

`php bin/magento msp:security:tfa:disable`

This will disable two factor auth globally.

Emergency commandline reset:
----------------------------

[](#emergency-commandline-reset)

If you need to manually reset one single user configuration (so you can restart configuration / subscription), type:

`php bin/magento msp:security:tfa:reset  `

e.g.:

`php bin/magento msp:security:tfa:reset admin google`

`php bin/magento msp:security:tfa:reset admin u2fkey`

`php bin/magento msp:security:tfa:reset admin authy`

Emergency of emergency and your house is on fire, your dog is lost and your wife doesn't love you anymore:
----------------------------------------------------------------------------------------------------------

[](#emergency-of-emergency-and-your-house-is-on-fire-your-dog-is-lost-and-your-wife-doesnt-love-you-anymore)

**DO NOT ATTEMPT TO MODIFY ANY DB INFORMATION UNLESS YOU UNDERSTAND WHAT YOU ARE DOING**

Table `core_config_data`:

- `msp/twofactorauth/enabled`: Set to zero to disable 2fa globally
- `msp/twofactorauth/force_providers`: Delete this entry to remove forced providers option

Table `msp_tfa_user_config`:

- Delete one user row to reset user's 2FA preference and configuration

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

1670d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/652aa98d25f6bb0dbacf7a805a9110b66e83d8222c60ca2d1b20fa31782a81d3?d=identicon)[magenxcommerce](/maintainers/magenxcommerce)

### Embed Badge

![Health badge](/badges/magenxcommerce-module-two-factor-auth/health.svg)

```
[![Health](https://phpackages.com/badges/magenxcommerce-module-two-factor-auth/health.svg)](https://phpackages.com/packages/magenxcommerce-module-two-factor-auth)
```

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[scheb/2fa-google-authenticator

Extends scheb/2fa-bundle with two-factor authentication using Google Authenticator

298.2M30](/packages/scheb-2fa-google-authenticator)[scheb/2fa-totp

Extends scheb/2fa-bundle with two-factor authentication using TOTP

292.7M22](/packages/scheb-2fa-totp)[msp/twofactorauth

Two Factor Authentication module for Magento2 - Member of MageSpecialist SecuritySuite

4462.1k2](/packages/msp-twofactorauth)[born05/craft-twofactorauthentication

Craft 4 plugin for two-factor or two-step login using Time Based OTP.

36100.1k1](/packages/born05-craft-twofactorauthentication)[clerkinc/backend-php

2755.0k](/packages/clerkinc-backend-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
