PHPackages                             kind-work/two-fa - 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. kind-work/two-fa

AbandonedArchivedStatamic-addon[Authentication &amp; Authorization](/categories/authentication)

kind-work/two-fa
================

Statamic 3 2FA addon

v1.5.1(4y ago)354.0k↓48.1%5[1 PRs](https://github.com/kind-work/two-fa/pulls)PHP

Since Nov 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/kind-work/two-fa)[ Packagist](https://packagist.org/packages/kind-work/two-fa)[ RSS](/packages/kind-work-two-fa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (23)Used By (0)

This addon is no longer supported. For a supported addon please see:

[![Statamic 3.0+](https://camo.githubusercontent.com/93c61a311851e398f5663226aca5d307d91ef898067c6b294110a785d6c2e735/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d332e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/93c61a311851e398f5663226aca5d307d91ef898067c6b294110a785d6c2e735/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d332e302b2d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![Codacy Badge](https://camo.githubusercontent.com/35a17e01d006fee9a0d5210731d018e4a4a7929fad6c0708ec4e49b70d95bb40/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3466653264386135303064393462303562343139386134396631626339643033)](https://www.codacy.com/gh/kind-work/two-fa/dashboard?utm_source=github.com&utm_medium=referral&utm_content=kind-work/two-fa&utm_campaign=Badge_Grade)

Two Factor Login for Statamic 3
-------------------------------

[](#two-factor-login-for-statamic-3)

Statamic 2FA is a middleware addon for [Statamic 3](https://github.com/statamic/cms) that adds 2FA (2 factor) auth to the control panel of Statamic 3 using time based codes.

Pricing
-------

[](#pricing)

Statamic 2FA is commercial software. You do not need a licence for development but when you are ready to deploy the site to production please purchase a licence per site on the [Statamic Marketplace](https://statamic.com/marketplace/addons/2fa).

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

[](#installation)

### Install the addon using composer

[](#install-the-addon-using-composer)

You can install this addon via composer with the following command or from the Statamic control panel.

```
composer require kind-work/two-fa
```

Usage
-----

[](#usage)

Add the `two_fa` field to your user blueprint. Edit your user profile in the control panel (CP) to set up 2FA protection for your account.

```
title: User
sections:
  main:
    display: Main
    fields:
      - handle: name
        field:
          type: text
          display: Name
      - handle: email
        field:
          type: text
          input: email
          display: 'Email Address'
      - handle: roles
        field:
          type: user_roles
          width: 50
      - handle: groups
        field:
          type: user_groups
          width: 50
      - handle: avatar
        field:
          type: assets
          max_files: 1
      - handle: two_fa
        field:
          type: two_fa
          localizable: false
          display: 'Two FA'
```

Force 2FA Login
---------------

[](#force-2fa-login)

To force 2FA for all users set an environment variable `FORCE_2FA` to `true`.

To force 2FA for specific roles, publish the config file and edit as appropriate.

```
php artisan vendor:publish --tag="two-fa-config"
```

QRCode Rendering
----------------

[](#qrcode-rendering)

By default QR codes are rendered as inline PNG files. This requires the Imagick PHP extension. If you would rather not or can not install Imagick you can render the QR codes as SVGs instead. You can customize this in your configuration file or by setting the environment variable `QR_CODE_TYPE` to `SVG`.

Max Attempts
------------

[](#max-attempts)

By default accounts are locked out after 5 attempts to enter a 2FA code. You can change this in the config or by setting the environment variable `2FA_MAX_ATTEMPTS`.

Remember Time
-------------

[](#remember-time)

A user can choose to remember the browser when they enter their 2FA code, so they do not have to re-enter their 2FA code on each login. By default the time to remember the code is 30 days. You can change this default by setting the number of minutes that the browser should be remembered in the config or the environment variable `2FA_REMEMBER_TIME`.

Database
--------

[](#database)

If you store your users in a database run the following command to generate a database migration.

```
php artisan vendor:publish --tag="twofa-migrations"
```

Migration from V1 to V2
-----------------------

[](#migration-from-v1-to-v2)

### File Based Users (default)

[](#file-based-users-default)

If you store your users in files you can optionally run the following migration to move over remember tokens and the 2FA-enabled visual indicator field to their new names.

```
php please 2fa:migrate:fields
```

### Database Users

[](#database-users)

To migrate your MySQL database to the new column names, run the following commands to copy over and run the migration.

```
php artisan vendor:publish --tag="twofa-migrations"
php artisan migrate
```

Changelog
---------

[](#changelog)

Please see the [Release Notes](https://statamic.com/addons/jrc9designstudio/2fa/release-notes) for more information what has changed recently.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

This is commercial software. You may use the package for your sites. Each site requires its own license. You can purchase a licence from The [Statamic Marketplace](https://statamic.com/marketplace/addons/2fa).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 88.3% 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 ~57 days

Recently: every ~95 days

Total

21

Last Release

1227d ago

Major Versions

v1.5.1 → v2.0.0-beta.12022-06-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/06a38f5945687b759eac9d704afcc383adca3fa017eaa76b7f3ada2bd21d8bb2?d=identicon)[jcohlmeyer](/maintainers/jcohlmeyer)

---

Top Contributors

[![jcohlmeyer](https://avatars.githubusercontent.com/u/1778271?v=4)](https://github.com/jcohlmeyer "jcohlmeyer (53 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![motion-work](https://avatars.githubusercontent.com/u/11538632?v=4)](https://github.com/motion-work "motion-work (1 commits)")[![Oleafeon](https://avatars.githubusercontent.com/u/20043831?v=4)](https://github.com/Oleafeon "Oleafeon (1 commits)")[![pryley](https://avatars.githubusercontent.com/u/134939?v=4)](https://github.com/pryley "pryley (1 commits)")[![martinolson](https://avatars.githubusercontent.com/u/7704388?v=4)](https://github.com/martinolson "martinolson (1 commits)")[![AndrewHaine](https://avatars.githubusercontent.com/u/16389134?v=4)](https://github.com/AndrewHaine "AndrewHaine (1 commits)")

---

Tags

2fa2fa-securityaddoncontrol-panelstatamicstatamic-addonstatamic-v3two-factor-authentication

### Embed Badge

![Health badge](/badges/kind-work-two-fa/health.svg)

```
[![Health](https://phpackages.com/badges/kind-work-two-fa/health.svg)](https://phpackages.com/packages/kind-work-two-fa)
```

###  Alternatives

[pragmarx/google2fa-laravel

A One Time Password Authentication package, compatible with Google Authenticator.

1.0k15.5M63](/packages/pragmarx-google2fa-laravel)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[devdojo/auth

The auth package to make authentication in your laravel applications easy to use.

61979.4k2](/packages/devdojo-auth)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[rainlab/user-plugin

User plugin for October CMS

11954.3k13](/packages/rainlab-user-plugin)

PHPackages © 2026

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