PHPackages                             robbyahnmsd/silverstripe-mfa - 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. robbyahnmsd/silverstripe-mfa

ActiveSilverstripe-vendormodule[Authentication &amp; Authorization](/categories/authentication)

robbyahnmsd/silverstripe-mfa
============================

Enable multi-factor authentication with fallback codes

4.x-dev(3y ago)0462[2 PRs](https://github.com/robbyahnmsd/silverstripe-mfa/pulls)1BSD-3-ClausePHPPHP ^7.4 || ^8.0

Since Jan 4Pushed 1y agoCompare

[ Source](https://github.com/robbyahnmsd/silverstripe-mfa)[ Packagist](https://packagist.org/packages/robbyahnmsd/silverstripe-mfa)[ RSS](/packages/robbyahnmsd-silverstripe-mfa/feed)WikiDiscussions 4 Synced 1mo ago

READMEChangelogDependencies (8)Versions (4)Used By (1)

MultiFactor Authentication for SilverStripe
===========================================

[](#multifactor-authentication-for-silverstripe)

[![CI](https://github.com/silverstripe/silverstripe-mfa/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/silverstripe-mfa/actions/workflows/ci.yml)[![Silverstripe supported module](https://camo.githubusercontent.com/9b7e93d393a01f6d3091fb30983b870aa863ef076858115faaa1c74b995854ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73696c7665727374726970652d737570706f727465642d3030373143342e737667)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)

### With thanks to Simon `Firesphere` Erkelens

[](#with-thanks-to-simon-firesphere-erkelens)

This module was based on pioneering work by Simon. It differs from the original implementation in its use of a pluggable React UI + JSON API architecture, and its enhanced management UI within the CMS. You can find Simon's original module [here](https://github.com/firesphere/silverstripe-bootstrapmfa).

Requirements
------------

[](#requirements)

- PHP ^7.1
- Silverstripe ^4.1
- defuse/php-encryption ^2.2 and OpenSSL PHP extension

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

[](#installation)

Install with Composer:

```
composer require silverstripe/mfa ^4.0

```

You should also install one of the additional multi-factor authenticator modules:

- [silverstripe/totp-authenticator](https://github.com/silverstripe/silverstripe-totp-authenticator)
- [silverstripe/webauthn-authenticator](https://github.com/silverstripe/silverstripe-webauthn-authenticator)

Setup
-----

[](#setup)

After installing this module *and* a supported factor method module (e.g. TOTP), the default member authenticator will be replaced with the MFA authenticator instead. This will provide no change in the steps taken to log in until an MFA Method has also been configured for the site. The TOTP and WebAuthn modules will configure themselves automatically.

After installing the MFA module and having at least one method configured, MFA will automatically be enabled. By default it will be optional (users can skip MFA registration). You can make it mandatory via the Settings tab in the admin area.

The MFA flow will only be applied to members with access to the CMS or administration area. See '[Broadening the scope of MFA](docs/en/broadening-the-scope-of-mfa.md)' for more detail.

You can disable MFA on an environment by setting a `BYPASS_MFA=1` environment variable, or via YAML config - see [local development](docs/en/local-development) for details.

### Configuring custom methods

[](#configuring-custom-methods)

If you have built your own MFA method, you can register it with the `MethodRegistry` to enable it:

```
SilverStripe\MFA\Service\MethodRegistry:
  methods:
    - MyCustomMethod
    - Another\Custom\Method\Here
```

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

[](#documentation)

This module provides two distinct processes for MFA; verification and registration. This module provides a decoupled architecture where front-end and back-end are separate. Provided with the module is a React app that interfaces with default endpoints added by this module. Please refer to the docs for specific information about the included functionality:

- [Debugging](docs/en/debugging.md)
- Creating new MFA methods
    - [Frontend](docs/en/creating-mfa-method-frontend.md)
    - [Backend](docs/en/creating-mfa-method-backend.md)
- [Local development](docs/en/local-development.md)
- [Encryption providers](docs/en/encryption.md)
- [Data store interfaces](docs/en/datastores.md)
- [Security](docs/en/security.md)
- [Integrating with other authenticators](docs/en/other-authenticators.md)

Module development
------------------

[](#module-development)

When adding translatable content to front-end UIs in the MFA module, you must ensure that these translations are pushed to Transifex. If this doesn't happen, they will be automatically removed in the next module released. See the [translation docs](https://docs.silverstripe.org/en/4/contributing/translation_process/#javascript-translations)for more information.

License
-------

[](#license)

See [license](LICENSE.md).

Versioning
----------

[](#versioning)

This library follows [Semver](http://semver.org). According to Semver, you will be able to upgrade to any minor or patch version of this library without any breaking changes to the public API. Semver also requires that we clearly define the public API for this library.

All methods, with `public` visibility, are part of the public API. All other methods are not part of the public API. Where possible, we'll try to keep `protected` methods backwards-compatible in minor/patch versions, but if you're overriding methods then please test your work before upgrading.

Reporting issues
----------------

[](#reporting-issues)

Please [create an issue](http://github.com/silverstripe/silverstripe-mfa/issues) for any bugs you've found, or features you're missing.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1221d ago

### Community

Maintainers

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

---

Top Contributors

[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (260 commits)")[![ScopeyNZ](https://avatars.githubusercontent.com/u/3260989?v=4)](https://github.com/ScopeyNZ "ScopeyNZ (136 commits)")[![emteknetnz](https://avatars.githubusercontent.com/u/4809037?v=4)](https://github.com/emteknetnz "emteknetnz (42 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (34 commits)")[![Firesphere](https://avatars.githubusercontent.com/u/680570?v=4)](https://github.com/Firesphere "Firesphere (34 commits)")[![NightJar](https://avatars.githubusercontent.com/u/778003?v=4)](https://github.com/NightJar "NightJar (19 commits)")[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (18 commits)")[![michalkleiner](https://avatars.githubusercontent.com/u/233342?v=4)](https://github.com/michalkleiner "michalkleiner (4 commits)")[![robbyahnmsd](https://avatars.githubusercontent.com/u/94818208?v=4)](https://github.com/robbyahnmsd "robbyahnmsd (4 commits)")[![sabina-talipova](https://avatars.githubusercontent.com/u/87288324?v=4)](https://github.com/sabina-talipova "sabina-talipova (3 commits)")[![sachajudd](https://avatars.githubusercontent.com/u/24258161?v=4)](https://github.com/sachajudd "sachajudd (2 commits)")[![HeyImPhil](https://avatars.githubusercontent.com/u/4695076?v=4)](https://github.com/HeyImPhil "HeyImPhil (2 commits)")[![dnsl48](https://avatars.githubusercontent.com/u/9313746?v=4)](https://github.com/dnsl48 "dnsl48 (2 commits)")[![chillu](https://avatars.githubusercontent.com/u/111025?v=4)](https://github.com/chillu "chillu (2 commits)")[![TheBnl](https://avatars.githubusercontent.com/u/1334195?v=4)](https://github.com/TheBnl "TheBnl (1 commits)")[![bergice](https://avatars.githubusercontent.com/u/541886?v=4)](https://github.com/bergice "bergice (1 commits)")[![Cheddam](https://avatars.githubusercontent.com/u/242621?v=4)](https://github.com/Cheddam "Cheddam (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")[![gurucomkz](https://avatars.githubusercontent.com/u/12028675?v=4)](https://github.com/gurucomkz "gurucomkz (1 commits)")[![indygriffiths](https://avatars.githubusercontent.com/u/32345766?v=4)](https://github.com/indygriffiths "indygriffiths (1 commits)")

---

Tags

securityAuthenticationsilverstripemodule2-Factor

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/robbyahnmsd-silverstripe-mfa/health.svg)

```
[![Health](https://phpackages.com/badges/robbyahnmsd-silverstripe-mfa/health.svg)](https://phpackages.com/packages/robbyahnmsd-silverstripe-mfa)
```

###  Alternatives

[silverstripe/mfa

Enable multi-factor authentication with fallback codes

10346.1k8](/packages/silverstripe-mfa)[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[axyr/silverstripe-adminlogin

Use a custom login screen to log in to the admin section

165.8k](/packages/axyr-silverstripe-adminlogin)[sicaboy/laravel-mfa

A Laravel package of Multi-factor Authentication (MFA/2FA) with a middleware.

101.2k](/packages/sicaboy-laravel-mfa)

PHPackages © 2026

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