PHPackages                             dieschittigs/contao-tfa-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. dieschittigs/contao-tfa-bundle

ActiveContao-bundle[Authentication &amp; Authorization](/categories/authentication)

dieschittigs/contao-tfa-bundle
==============================

Adds TOTP based Two-Factor Authentication to Contao 4 backend users

v1.0.2(8y ago)879[3 issues](https://github.com/DieSchittigs/contao-tfa-bundle/issues)LGPL-3.0PHPPHP ^5.6|^7.0

Since Jan 8Pushed 2y ago3 watchersCompare

[ Source](https://github.com/DieSchittigs/contao-tfa-bundle)[ Packagist](https://packagist.org/packages/dieschittigs/contao-tfa-bundle)[ RSS](/packages/dieschittigs-contao-tfa-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

⛔️ Unmaintained ⛔️
==================

[](#️-unmaintained-️)

As there is a native support for contao 4.13, this bundle will not be developed further.

Contao Two-Factor Authentication
================================

[](#contao-two-factor-authentication)

[![Packagist](https://camo.githubusercontent.com/43a61f33659c69dbba72117c5beb6619c155fd3f4c15b6dc787e82e373084323/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6469657363686974746967732f636f6e74616f2d7466612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/dieschittigs/contao-tfa-bundle)[![Packagist](https://camo.githubusercontent.com/4f4f50c4594491a9a2180571bab4712ff903e14d51cf7dcab061d367a3302f39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6469657363686974746967732f636f6e74616f2d7466612d62756e646c652e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/dieschittigs/contao-tfa-bundle)[![License](https://camo.githubusercontent.com/487eb89d9c3ef9b7fe397d8032687111f9f58f026eb5ce66e968e4f594bddb26/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4c47504c25323076332d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/487eb89d9c3ef9b7fe397d8032687111f9f58f026eb5ce66e968e4f594bddb26/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4c47504c25323076332d626c75652e7376673f7374796c653d666f722d7468652d6261646765)

This bundle enables Two-Factor Authentication (TFA/2FA) via [TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm) for Contao backend users. Users with 2FA enabled are not allowed to visit any backend page before typing in the correct access code after having logged in.

The bundle is compatible with **Contao 4.4** or newer.

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

[](#installation)

No matter which method you use to install the package, make sure to run the install tool afterwards so that the additional database column can be created.

#### Composer

[](#composer)

With [Composer](https://getcomposer.org/) simply type `composer require dieschittigs/contao-tfa-bundle` in your Contao installation's root folder.

#### Contao Manager (Contao 4.5+)

[](#contao-manager-contao-45)

Select *Packages &gt; Install Packages* and search for `contao-tfa-bundle`. The button *Check &amp; Install* will then install it for you.

Usage
-----

[](#usage)

To enable Two-Factor Authentication for your account, visit your backend profile and open the "*Two-Factor Authentication*" section. Scan the displayed QR code with a compatible app (we recommend **Google Authenticator**, which is available for [iOS](https://itunes.apple.com/app/google-authenticator/id388497605) and [Android](https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2)) and verify by typing in the code generated by your app before hitting *Save*.

Since the generated code is time-based and thus changes periodically, it is important that your server time is set up correctly. By default the used library for code verification is able to correct for a delay of up to 30 seconds. This can be changed in the security section of your application settings.

You can also force all users to set up Two-Factor Authentication by toggling the checkbox for "*Force Two-Factor Authentication*" in your application's security settings. This will redirect all users (including yourself as an admin) to a 2FA setup page, before they can access any other page.

In case a user doesn't have access to their code anymore, any admin is able to reset the Two-Factor Authentication on a per-user basis in the user settings. There, admins can also force users to set up Two-Factor Authentication when they next log in, similar to how the setting "*Password change required*" works.

Caveats
-------

[](#caveats)

This bundle intercepts all backend requests to redirect users that have yet to authenticate themselves to a 2FA authentication page. As such the users can still log in, but they can't access any backend pages.

If you plan to execute code on behalf of the user, make sure to take the two-factor status into account. Although the user can't visit any pages, they are still fully authenticated by the Symfony security layer, so you'll have to add extra checks to make sure two-factor authentication is complete.

Roadmap
-------

[](#roadmap)

Although we haven't yet decided on any further features, the following might be possible:

- Additional 2FA methods (e.g. mail)
- Backup Codes

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

3141d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4989989?v=4)[Martin Schittig](/maintainers/benfolds)[@benfolds](https://github.com/benfolds)

![](https://www.gravatar.com/avatar/675d504ab41a615f10b88b54fe000ea2d05158c6d4cd3425a6f863bd6ac22e8f?d=identicon)[Padarom](/maintainers/Padarom)

![](https://avatars.githubusercontent.com/u/1080347?v=4)[Tobias Duehr](/maintainers/saibotd)[@saibotd](https://github.com/saibotd)

---

Top Contributors

[![benfolds](https://avatars.githubusercontent.com/u/4989989?v=4)](https://github.com/benfolds "benfolds (2 commits)")

---

Tags

bundlecontaocontao-bundletwo-factor-authenticationbundletotpAuthentication2fatwo-factorcontaotfacontao-bundlecontao-extension

### Embed Badge

![Health badge](/badges/dieschittigs-contao-tfa-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/dieschittigs-contao-tfa-bundle/health.svg)](https://phpackages.com/packages/dieschittigs-contao-tfa-bundle)
```

###  Alternatives

[paragonie/multi-factor

Vendor-agnostic two-factor authentication library

141199.3k2](/packages/paragonie-multi-factor)[scheb/2fa-totp

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

293.5M60](/packages/scheb-2fa-totp)[markshust/magento2-module-disabletwofactorauth

The DisableTwoFactorAuth module provides the ability to disable two-factor authentication.

2282.9M10](/packages/markshust-magento2-module-disabletwofactorauth)[chillerlan/php-authenticator

A generator for counter- and time based 2-factor authentication codes (Google Authenticator). PHP 8.2+

56140.1k4](/packages/chillerlan-php-authenticator)[scheb/2fa-backup-code

Extends scheb/2fa-bundle with backup codes support

194.3M47](/packages/scheb-2fa-backup-code)[remotemerge/totp-php

Lightweight, fast, and secure TOTP (2FA) authentication library for PHP — battle tested, dependency free, and ready for enterprise integration.

2323.1k](/packages/remotemerge-totp-php)

PHPackages © 2026

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