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

Git and your environment

It is great to deploy sites via git, and use Statamic's built-in Git Automation to have changes pushed back to your repository.

A user's two factor settings are stored in the user's yaml file, and these too may be updated within Git depending on your configuration.

This means that your APP_KEY must remain identical across the environments where you wish to use Two Factor.

You can safely disable Two Factor on your local dev environment, and make changes to users, without the Two Factor details being impacted locally.

This means you could have:

  • Local dev, any APP_KEY, with Two Factor disabled

  • Staging, use the same APP_KEY as Production

  • Production, use the same APP_KEY as Staging

Laravel encrypts and decrypts data based on the APP_KEY.