PHPackages                             erkens/2fa-text - 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. erkens/2fa-text

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

erkens/2fa-text
===============

Extends scheb/2fa-bundle with two-factor authentication via simple text messages

v3.2(2mo ago)15277.9k↓53.8%4[1 issues](https://github.com/erkens/2fa-text/issues)MITPHPPHP ^8.0

Since Jun 26Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/erkens/2fa-text)[ Packagist](https://packagist.org/packages/erkens/2fa-text)[ Docs](https://github.com/Erkens/2fa-text)[ RSS](/packages/erkens-2fa-text/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

erkens/2fa-text
===============

[](#erkens2fa-text)

This package extends [scheb/2fa-bundle](https://github.com/scheb/2fa-bundle) with two-factor authentication via text messages.

It is based on the official [scheb/2fa-email](https://github.com/scheb/2fa-email) package.

Usage
-----

[](#usage)

After you have installed and configured [scheb/2fa-bundle](https://github.com/scheb/2fa-bundle) you can install this package:

```
composer require erkens/2fa-text

```

First thing to do is make a new service that implements `Erkens\Security\TwoFactorTextBundle\TextSender\AuthCodeTextInterface`so we can actually send a sms or text message. This service can then be used in the configuration as "auth\_code\_sender":

```
two_factor_text:
    enabled: true
    auth_code_sender: Erkens\Security\TwoFactorTextBundle\TextSender\ExampleTextSender
    digits: 6
    text: 'To login, use this code: %s'
    template: '@SchebTwoFactor/Authentication/form.html.twig'

```

You can add this in its own yaml file inside `config/packages` or place it within the existing `scheb_2fa.yaml`. But make sure you have the `two_factor_text` at the root of the yaml-tree (not under `scheb_two_factor`).

**Next**

Your `User` entity must implement the `Erkens\Security\TwoFactorTextBundle\Model\TwoFactorTextInterface` and implement the required methods.

License
-------

[](#license)

This software is available under the [MIT license](LICENSE).

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance87

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

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 ~178 days

Total

13

Last Release

62d ago

Major Versions

v1.x-dev → v2.0.02021-11-15

v2.x-dev → v3.0.02024-06-17

PHP version history (3 changes)v1.0.0PHP &gt;=7.2.5

v2.0.0PHP &gt;=7.4

v2.1.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/d94f369127817b27f1d3afe0efaa31264725df40bb79fbde9a04765b6eeb8fda?d=identicon)[Erkens](/maintainers/Erkens)

---

Top Contributors

[![erkens](https://avatars.githubusercontent.com/u/10248696?v=4)](https://github.com/erkens "erkens (9 commits)")[![ehymel](https://avatars.githubusercontent.com/u/11381475?v=4)](https://github.com/ehymel "ehymel (2 commits)")[![kevinirlen](https://avatars.githubusercontent.com/u/45947370?v=4)](https://github.com/kevinirlen "kevinirlen (1 commits)")

---

Tags

symfonyAuthentication2fasmstexttwo-factortwo-step

### Embed Badge

![Health badge](/badges/erkens-2fa-text/health.svg)

```
[![Health](https://phpackages.com/badges/erkens-2fa-text/health.svg)](https://phpackages.com/packages/erkens-2fa-text)
```

###  Alternatives

[scheb/2fa-google-authenticator

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

309.1M49](/packages/scheb-2fa-google-authenticator)[scheb/2fa-trusted-device

Extends scheb/2fa-bundle with trusted devices support

365.8M34](/packages/scheb-2fa-trusted-device)[scheb/2fa-email

Extends scheb/2fa-bundle with two-factor authentication via email

354.9M27](/packages/scheb-2fa-email)[scheb/2fa-totp

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

293.3M50](/packages/scheb-2fa-totp)[scheb/2fa-backup-code

Extends scheb/2fa-bundle with backup codes support

184.1M40](/packages/scheb-2fa-backup-code)[scheb/2fa-bundle

A generic interface to implement two-factor authentication in Symfony applications

7515.8M114](/packages/scheb-2fa-bundle)

PHPackages © 2026

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