PHPackages                             scheb/two-factor-bundle - 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. scheb/two-factor-bundle

Abandoned → [scheb/2fa-bundle](/?search=scheb%2F2fa-bundle)ArchivedSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

scheb/two-factor-bundle
=======================

\[ABANDONED\] Two-factor authentication for Symfony applications (new version: scheb/2fa-bundle)

v4.18.4(5y ago)4003.5M—3.8%10711MITPHPPHP &gt;=7.1.3

Since Jan 10Pushed 4y ago16 watchersCompare

[ Source](https://github.com/scheb/two-factor-bundle)[ Packagist](https://packagist.org/packages/scheb/two-factor-bundle)[ Docs](https://github.com/scheb/two-factor-bundle)[ RSS](/packages/scheb-two-factor-bundle/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (127)Used By (11)Security (2)

scheb/two-factor-bundle
=======================

[](#schebtwo-factor-bundle)

### ⚠ Unmaintained version

[](#-unmaintained-version)

Please upgrade your project to a recent version. Use bundle version 5 (or newer), which is available as `scheb/2fa-bundle` from the [scheb/2fa](https://github.com/scheb/2fa) repository.

---

This bundle provides **[two-factor authentication](https://en.wikipedia.org/wiki/Multi-factor_authentication) for your [Symfony](https://symfony.com/) application**.

[![Build Status](https://github.com/scheb/two-factor-bundle/workflows/CI/badge.svg?branch=4.x)](https://github.com/scheb/two-factor-bundle/actions?query=workflow%3ACI+branch%3A4.x)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a84a6e4cab8d31d4cd04d25f53a8488e2ad3ce0df9dcf9b712c80e3127116e84/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73636865622f74776f2d666163746f722d62756e646c652f6261646765732f7175616c6974792d73636f72652e706e673f623d342e78)](https://scrutinizer-ci.com/g/scheb/two-factor-bundle/?branch=4.x)[![Code Coverage](https://camo.githubusercontent.com/2a94e748f233d0dde1eaa520d2ff48ad14915334f3c8b444311e1e4f7618881d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73636865622f74776f2d666163746f722d62756e646c652f6261646765732f636f7665726167652e706e673f623d342e78)](https://scrutinizer-ci.com/g/scheb/two-factor-bundle/?branch=4.x)[![Latest Stable Version](https://camo.githubusercontent.com/2adcf32f7d35e2ba4f795196f24f694fbf6f0fe1fedddd60f7ca8c1c0f165828/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73636865622f74776f2d666163746f722d62756e646c65)](https://packagist.org/packages/scheb/two-factor-bundle)[![Monthly Downloads](https://camo.githubusercontent.com/31ef3b2cff7adeff26b55697770a0eb62170feec1d8cf7a9d563a573c6447b76/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f73636865622f74776f2d666163746f722d62756e646c65)](https://packagist.org/packages/scheb/two-factor-bundle/stats)[![Total Downloads](https://camo.githubusercontent.com/6ea02aa68eb84b8aa32c1f01e438c80c938be415a6e98e6954d64f1bca121bcf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73636865622f74776f2d666163746f722d62756e646c65)](https://packagist.org/packages/scheb/two-factor-bundle/stats)[![License](https://camo.githubusercontent.com/622c8732c3eacc454a289a597ca30e22e2d2b1bd9ffb0b0946a19402b4364256/68747470733a2f2f706f7365722e707567782e6f72672f73636865622f74776f2d666163746f722d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/scheb/two-factor-bundle)

[![Logo](Resources/doc/2fa-logo.svg)](Resources/doc/2fa-logo.svg)

---

It comes with the following two-factor authentication methods:

- [TOTP authentication](https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm)
- [Google Authenticator](https://en.wikipedia.org/wiki/Google_Authenticator)
- Authentication code via email

Additional features you will like:

- Interface for custom two-factor authentication methods
- Trusted IPs
- Trusted devices (once passed, no more two-factor authentication on that device)
- Single-use backup codes for when you don't have access to the second factor device
- Multi-factor authentication (more than 2 steps)
- CSRF protection
- Whitelisted routes (accessible during two-factor authentication)

Installation
------------

[](#installation)

```
composer require scheb/two-factor-bundle
```

... and follow the [installation instructions](Resources/doc/installation.md).

Documentation
-------------

[](#documentation)

Detailed documentation of all features can be found in the [Resources/doc](Resources/doc/index.md) directory.

Version Guidance
----------------

[](#version-guidance)

**⚠ Version 4.x is no longer maintained.**

Please upgrade your project to a recent version. Use bundle version 5 (or newer), which is available as `scheb/2fa-bundle` from the [scheb/2fa](https://github.com/scheb/2fa) repository.

License
-------

[](#license)

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

Security
--------

[](#security)

For information about the security policy and know security issues, see [SECURITY.md](SECURITY.md).

Contributing
------------

[](#contributing)

Want to contribute to this project? See [CONTRIBUTING.md](CONTRIBUTING.md).

Support Me
----------

[](#support-me)

I'm developing this library since 2014. I love to hear from people using it, giving me the motivation to keep working on my open source projects.

If you want to let me know you're finding it useful, please consider giving it a star ⭐ on GitHub.

If you love my work and want to say thank you, you can help me out for a beer 🍻️ [via PayPal](https://paypal.me/ChristianScheb).

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity62

Solid adoption and visibility

Community40

Growing community involvement

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~22 days

Recently: every ~122 days

Total

127

Last Release

1628d ago

Major Versions

v3.26.1 → v4.11.12019-12-19

v3.28.0 → v4.13.02020-02-02

v3.29.0 → v4.14.02020-02-15

1.x-dev → 2.x-dev2020-05-26

2.x-dev → v4.17.02020-06-01

PHP version history (2 changes)v3.0.0-beta1PHP ^7.1.3

v4.18.1PHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/496658d46619a414a62b1e933fb7fc2e57eff4f0a4109f4cffc32093f57d65da?d=identicon)[scheb](/maintainers/scheb)

---

Top Contributors

[![scheb](https://avatars.githubusercontent.com/u/1259952?v=4)](https://github.com/scheb "scheb (657 commits)")[![umpirsky](https://avatars.githubusercontent.com/u/208957?v=4)](https://github.com/umpirsky "umpirsky (18 commits)")[![j0k3r](https://avatars.githubusercontent.com/u/62333?v=4)](https://github.com/j0k3r "j0k3r (8 commits)")[![darookee](https://avatars.githubusercontent.com/u/104579?v=4)](https://github.com/darookee "darookee (7 commits)")[![AaronCritchley](https://avatars.githubusercontent.com/u/5992653?v=4)](https://github.com/AaronCritchley "AaronCritchley (5 commits)")[![maxhelias](https://avatars.githubusercontent.com/u/12966574?v=4)](https://github.com/maxhelias "maxhelias (5 commits)")[![dfridrich](https://avatars.githubusercontent.com/u/3758421?v=4)](https://github.com/dfridrich "dfridrich (4 commits)")[![zerkms](https://avatars.githubusercontent.com/u/302295?v=4)](https://github.com/zerkms "zerkms (3 commits)")[![Baptiste363](https://avatars.githubusercontent.com/u/183502461?v=4)](https://github.com/Baptiste363 "Baptiste363 (3 commits)")[![lordjancso](https://avatars.githubusercontent.com/u/6485707?v=4)](https://github.com/lordjancso "lordjancso (3 commits)")[![quentinus95](https://avatars.githubusercontent.com/u/8060564?v=4)](https://github.com/quentinus95 "quentinus95 (3 commits)")[![rg-scheb](https://avatars.githubusercontent.com/u/249925692?v=4)](https://github.com/rg-scheb "rg-scheb (3 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (3 commits)")[![Spomky](https://avatars.githubusercontent.com/u/1091072?v=4)](https://github.com/Spomky "Spomky (3 commits)")[![stephanvierkant](https://avatars.githubusercontent.com/u/601833?v=4)](https://github.com/stephanvierkant "stephanvierkant (3 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (3 commits)")[![montaniasystemab](https://avatars.githubusercontent.com/u/12112548?v=4)](https://github.com/montaniasystemab "montaniasystemab (2 commits)")[![mkrauser](https://avatars.githubusercontent.com/u/494845?v=4)](https://github.com/mkrauser "mkrauser (2 commits)")[![sdespont](https://avatars.githubusercontent.com/u/646632?v=4)](https://github.com/sdespont "sdespont (2 commits)")[![keksa](https://avatars.githubusercontent.com/u/7985651?v=4)](https://github.com/keksa "keksa (2 commits)")

---

Tags

2faauthenticationgoogle-authenticatorsecuritysymfony-bundletotptwo-factor-authenticationsymfonyAuthentication2fatwo-factortwo-step

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/scheb-two-factor-bundle/health.svg)

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

###  Alternatives

[scheb/2fa

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

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

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

6914.0M62](/packages/scheb-2fa-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

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