A two factor authentication (2FA) addon for Statamic.
We're 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
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
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.
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!
Documentation
See the documentation for detailed installation, configuration and usage instructions.
Testing
composer test
Security
Security related issues should be emailed to [email protected] instead of logging an issue.
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.
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
- Marty Friedel
- Fabio Widmer and Marco Rieser for Swiss German translations
- Joshua van der Poll and Richard Verbruggen for Dutch translations
- Håvard Grimelid for Norwegian Bokmål translations
- Encodia for Italian translations
- Danique Wijnalda for a language typo fix