A password alone is no longer enough to protect financial, inventory, and contact data in an ERP system. A single leak or a successful phishing attack is all it takes for an outsider to log in to an employee's account. That is why two-factor authentication (2FA) is one of the simplest and most effective security measures you can enable in Odoo. In this article, we show how to set it up in Odoo 19, how it works, and how to manage it in your company.
Want to see what the user profile and security settings look like in practice? Try Odoo for free.
What is two-factor authentication in Odoo?
Two-factor authentication requires two independent elements when logging in: something you know (your password) and something you have (a phone with an app that generates codes). Even if your password is compromised, no one can access the account without the one-time code.
Odoo implements 2FA based on the TOTP (Time-based One-Time Password) standard. Codes are generated by an authenticator app on your smartphone and change every 30 seconds. It works with popular apps such as Google Authenticator, Microsoft Authenticator, Authy, or FreeOTP.
Prerequisites
Before you start, make sure that:
- you have an authenticator app installed on your phone,
- your phone's clock is set automatically (TOTP codes depend on accurate time),
- you are logged in to your Odoo account and know your current password,
- the module responsible for TOTP (Two-Factor Authentication) is available in your database – in most implementations it is available by default, and if needed, it can be installed from the Apps list.
How to enable 2FA in Odoo step by step
Each user performs the setup in their own profile. The whole process takes about two minutes.
Step 1: Open your user profile
Click your avatar in the top-right corner and select My Profile (in older versions of Odoo, this item is called My Preferences). Go to the Account Security tab.
Step 2: Launch the wizard
Click the Enable two-factor authentication button. Odoo will ask you to confirm with your current password – this is an additional safeguard against unauthorized changes to your settings.
Step 3: Scan the QR code
A QR code will appear on the screen. Open your authenticator app, add a new account, and scan the code. If you cannot use your camera, use the option to manually enter the text key displayed below the code. Treat the key like a password and keep it in a safe place (e.g., a password manager), because it lets you restore the setup on a new phone.
Step 4: Confirm with a code and activate
Enter the six-digit code shown in the app into Odoo and confirm. After successful verification, 2FA is activated, and the next time you log in, after entering your password, the system will ask for a code.
Implementing a security policy across an entire organization can be complex, especially with many users and different roles. If you want to be sure everything is configured correctly, contact us.
Logging in with 2FA and trusted devices
When logging in, after entering your username and password, you will see a field for the code from the app. Below it is an option to remember the device (Trust this device). Once selected, Odoo will remember the browser and will not ask for a code at every login – by default for 90 days. This is convenient on a company computer, but do not select it on shared or public devices.
You can review the list of trusted devices in the Account Security tab. If a phone or laptop is lost, use the Revoke All button so that every subsequent login requires a code.
How to disable or reset 2FA
Users can disable authentication in the same Account Security tab by selecting the option to disable 2FA and confirming with their password. If an employee has lost their phone and has no access to codes, an administrator can help restore access from Settings → Users & Companies → Users. After verifying the person's identity, simply open the user's record and, in the Action menu, choose to disable two-factor authentication, then ask the employee to set it up again with a new device. Keep in mind that changing the password alone does not disable 2FA. We described the details of changing a password in the article How to Change a User Password in Odoo 19: Step-by-Step.
Security best practices in Odoo
2FA works best as part of a broader data protection strategy. It is worth combining it with other mechanisms:
- Strong passwords and changing them on first login – see how to force a password change on first login in Odoo 19.
- External login – if your company uses Google Workspace, consider Google sign-in in Odoo 19, where two-factor verification can be provided by the identity provider.
- Centralized account management – in organizations with a user directory, the integration described in the guide will be helpful: How to Set Up LDAP and Active Directory in Odoo.
- Principle of least privilege – assign users only the permissions they need. This post will help: Odoo Roles and Access Rights – Complete Guide.
It is particularly important to cover administrator accounts and people with access to accounting, payroll, and customer data with 2FA. These are the most frequent targets of attacks.
See how easily Odoo combines account security with your team's daily work, and test the system with no commitment.
Common problems and solutions
The code from the app is rejected
The most common cause is incorrect time on the phone. Enable automatic time synchronization and try again with a new code.
Changing your phone
Before replacing your device, transfer your accounts in the authenticator app (e.g., using the export or backup feature) or use the saved text key. If that is not possible, ask an administrator to reset 2FA.
Integrations and API access
External systems that connect to Odoo via API cannot use a regular user password when 2FA is enabled. Instead, use API keys generated in the Account Security tab (New API Key button). The key is displayed only once, so save it immediately in a secure place.
FAQ – frequently asked questions
Is two-factor authentication in Odoo paid?
No. The TOTP-based 2FA feature is available in the standard system and does not require any additional license fees.
Can I enforce 2FA for all users?
Each user activates 2FA in their own profile, but in newer versions of Odoo, an administrator can additionally enforce this method for all accounts in the general settings, in the Permissions section (if the option is available in your installation, it requires the 2FA enforcement module). It is also worth introducing an internal security policy and carrying out the setup during implementation or training. If you need stricter enforcement, contact us – we will choose a suitable solution.
What should I do if a user loses the phone with the app?
After verifying the user's identity, an administrator can disable 2FA for the account, and the user will set it up again on a new device. It is also worth revoking trust for all remembered devices.
Summary
Enabling 2FA in Odoo takes a few minutes and significantly raises the security level of your company data. All you need is an authenticator app, a QR code, and password confirmation. Combined with a sensible password policy, permission control, and optional external login, you build solid protection for your entire ERP environment.
Need support securing Odoo?
The KK Innovations team will help you configure two-factor authentication, user roles, and a security policy tailored to your company. Get in touch and secure your system today.