---
title: Two-factor authentication
project: Todomator
version: 1.7
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/todomator/1-7/guides/two-factor-authentication/
updated: 2026-11-19T04:33:09.388Z
---

# Two-factor authentication

> Ask for an emailed code in addition to the password.

With two-factor authentication, a user needs a password and a code from their mailbox to sign in.

## Before you start

Todomator sends the codes by email. Add your mail server to [the config file](../../reference/config-file/#mail) first. Without a working mail server, the user cannot sign in.

## Turn it on or off

A super admin sets this for each user.

1. Click the menu button at the top left, then **Users**.
2. Click the pencil icon next to the user.
3. Tick **Enable 2FA authentication** to turn it on. Untick it to turn it off.
4. Click **SUBMIT**.

The box does not show the current setting of the user. It shows what Todomator saves when you click **SUBMIT**. Check the box every time you change a user, even when you only change another field.

## Sign in with a code

1. Enter your email address and password.
2. Click **Sign-in**.
3. Find the code in your mailbox.
4. Enter it in **Verification code**.
5. Click **Sign-in**.

![The sign-in form asking for the verification code](/files/Jao46q3IY61f.webp)

Each code works once, for 10 minutes. To get a new code, start the sign-in again.
