Mity Docs Mity Docs for Mity Digital
Two Factor for Statamic Documentation



Two Factor for Statamic requires:

  • Statamic 4.16 or later

  • PHP 8.2 and later


Install Two Factor via composer:

1composer require mitydigital/statamic-two-factor

If you want to publish the configuration file, go for it - but the config options can all be managed via your env file.

1php artisan vendor:publish --tag=statamic-two-factor-config

During the installation, Two Factor will add the new Fieldtype to your User Blueprint. This field will allow you and your users to manage their two factor details.

Keep reading to the Configuration to find out how to get Two Factor up and running.

Required: email

Emails are sent by this add-on when a recovery code has been successfully used.

Your site should be configured to send emails. Don't forget to set this up.

Optional: database migration

If you are storing your users in a database, you'll need to configure your Statamic site to do this, and also run our (or update your) migration to include the Two Factor columns.

We've included a migration, which you can publish if you need:

1php artisan vendor:publish --tag=statamic-two-factor-migrations