PHPackages                             mitydigital/statamic-two-factor - 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. mitydigital/statamic-two-factor

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

mitydigital/statamic-two-factor
===============================

Two Factor Authentication for Statamic 5

2.7.3(6mo ago)231.1k↑242.9%3[1 issues](https://github.com/mitydigital/statamic-two-factor/issues)MITPHPPHP ^8.2

Since Aug 9Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/mitydigital/statamic-two-factor)[ Packagist](https://packagist.org/packages/mitydigital/statamic-two-factor)[ RSS](/packages/mitydigital-statamic-two-factor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (28)Used By (0)

Two Factor for Statamic
=======================

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

[![Statamic 5](https://camo.githubusercontent.com/5906ee2ee205a982898d8849328e0748de163376908522681d4a9581a0609fb4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)](https://camo.githubusercontent.com/5906ee2ee205a982898d8849328e0748de163376908522681d4a9581a0609fb4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352d4646323639453f7374796c653d666f722d7468652d6261646765266c696e6b3d68747470733a2f2f73746174616d69632e636f6d)[![Statamic Two Factor on Packagist](https://camo.githubusercontent.com/a9549ac7d8a0e9d2f06ced32e9b7cb4e669d5555dc6a518da075200deaf246f1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6974796469676974616c2f73746174616d69632d74776f2d666163746f723f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/mitydigital/statamic-two-factor/stats)

---

> A two factor authentication (2FA) addon for Statamic.

We're about to become a core feature!
-------------------------------------

[](#were-about-to-become-a-core-feature)

The Statamic team have migrated this addon in to Statamic's core for Statamic 6.

**Yes, that means two factor authentication will be a core feature of Statamic 6.**

There will be no updates to this addon to support Statamic 6, however security updates will be released until the end of Statamic 5's security update window from the core Statamic team.

Thank you for your support of this addon over the years - if you've found it useful or just want to say hi, please reach out.

Introduction
------------

[](#introduction)

Two Factor for Statamic is an addon for Statamic that enables users of the Control Panel (CP) to utilise two factor authentication using a one-time password (such as with Google Authenticator or password manager apps like 1Password).

This addon can enforce two factor authentication to:

- all CP users (the default), or
- users by Role (the `enforced_roles` config property)

If you have two Roles - Admin and Author - and you enforce two factor for Admin, any Author users can optionally opt-in to Two Factor by visiting their profile.

Features
--------

[](#features)

This addon enables two factor authentication for users of the Control Panel. When enabled, users will be prompted to set up two factor before they can continue. The addon also creates emergency recovery codes for each user's account.

This addon:

- can be enabled or disabled per environment (such as disabling on your local dev environment)
- can be enabled for all users (default) or by Roles, with non-enforced Roles optionally able to opt-in locks user accounts after a number of failed two factor challenge attempts
- can re-challenge users after a period of time (default to 30 days, or can be disabled)
- adds a fieldtype for user and profile editing

Users are able to:

- show or re-generate their emergency recovery codes
- remove two factor authentication (which will log them out, and require set up on their next login)

Admin can:

- unlock user accounts
- remove two factor setup details from any user

These admin behaviours are connected to Statamic's "edit" permission for Users.

Two Factor for Statamic is a Commercial Addon.
----------------------------------------------

[](#two-factor-for-statamic-is-a-commercial-addon)

You can use it for free while in development, but requires a license to use on a live site.

Please note that this is only for Statamic 5 - from Statamic 6, the functionality offered by this addon will be a core feature.

Learn more or buy a license on the [Statamic Marketplace](https://statamic.com/addons/mity-digital/two-factor)!

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

[](#documentation)

See the [documentation](https://docs.mity.com.au/two-factor) for detailed installation, configuration and usage instructions.

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

Security related issues should be emailed to  instead of logging an issue.

Support
-------

[](#support)

We love to share work like this, and help the community. However it does take time, effort and work.

The best thing you can do is [log an issue](../../issues).

Please try to be detailed when logging an issue, including a clear description of the problem, steps to reproduce the issue, and any steps you may have tried or taken to overcome the issue too. This is an awesome first step to helping us help you. So be awesome - it'll feel fantastic.

Credits
-------

[](#credits)

- [Marty Friedel](https://github.com/martyf)
- [Fabio Widmer](https://github.com/FabioWidmer) and [Marco Rieser](https://github.com/marcorieser) for Swiss German translations
- [Joshua van der Poll](https://github.com/joshuavanderpoll) and [Richard Verbruggen](https://github.com/vannut) for Dutch translations
- [Håvard Grimelid](https://github.com/hgrimelid) for Norwegian Bokmål translations
- [Encodia](https://github.com/encodiaweb) for Italian translations
- [Danique Wijnalda](https://github.com/dnwjn) for a language typo fix

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance56

Moderate activity, may be stable

Popularity34

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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 ~31 days

Total

27

Last Release

203d ago

Major Versions

1.x-dev → 2.0.02024-05-09

### Community

Maintainers

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

---

Top Contributors

[![martyf](https://avatars.githubusercontent.com/u/1491079?v=4)](https://github.com/martyf "martyf (83 commits)")[![davideprevosto](https://avatars.githubusercontent.com/u/28837345?v=4)](https://github.com/davideprevosto "davideprevosto (1 commits)")[![dnwjn](https://avatars.githubusercontent.com/u/57711725?v=4)](https://github.com/dnwjn "dnwjn (1 commits)")[![FabioWidmer](https://avatars.githubusercontent.com/u/6362414?v=4)](https://github.com/FabioWidmer "FabioWidmer (1 commits)")[![hgrimelid](https://avatars.githubusercontent.com/u/40372?v=4)](https://github.com/hgrimelid "hgrimelid (1 commits)")[![joshuavanderpoll](https://avatars.githubusercontent.com/u/16516497?v=4)](https://github.com/joshuavanderpoll "joshuavanderpoll (1 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mitydigital-statamic-two-factor/health.svg)

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

###  Alternatives

[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)[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)[devdojo/auth

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

61979.4k2](/packages/devdojo-auth)[webbingbrasil/filament-2fa

A 2FA plugin for filament.

4740.7k](/packages/webbingbrasil-filament-2fa)

PHPackages © 2026

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