Odoo ships with two-factor authentication (2FA) based on time-based one-time codes (TOTP). After the password, the user types a six-digit code from an authenticator app or password manager. It is free, built in, and the first control every Odoo database should switch on.
Turn on 2FA for your own account
In recent Odoo versions:
- Click your avatar (top right) and open My Preferences.
- Open the Security tab and click Enable 2FA.
- Confirm your password, then scan the QR code with your authenticator app.
- Enter the code the app shows and confirm.
Log out and back in to check it works. Menu labels differ slightly between versions; Odoo 17 uses an Account Security tab.
Enforce 2FA for everyone
- Odoo 19 and 20: in Settings, under Permissions, tick Enforce two-factor authentication and choose Employees only or All users. “All users” also covers portal users.
- Odoo 17 and 18: install the 2FA by mail module first, then the same enforcement option appears in Settings.
In versions that use the 2FA by mail module, users without an authenticator receive a login code by email until they set one up.
When someone loses their phone
Odoo’s documentation is clear: if a user loses access to their authenticator, an administrator must deactivate 2FA on that account before the user can log in again. Write that down as a procedure: who may do it, how the person’s identity is checked (a call-back, not an email), and how the reset is logged.
Where TOTP stops
Authenticator codes are a large improvement over passwords alone, but they are not phishing-resistant. A convincing fake Odoo login page can collect the password and the six-digit code and replay both within seconds. Codes also cannot tell administrators apart from everyone else: enforcement is all-or-nothing by user type.
For administrators, finance approvers and anyone who can change bank details, use a phishing-resistant method. Odoo 18 and later support passkeys, and SecureKey 2FA adds hardware security keys with per-group enforcement and model policies.
Checklist
- 2FA enforced for at least all employees.
- A written, tested lost-device procedure.
- Administrators on a phishing-resistant method.
- Test your security key before rolling it out.