Repository
odoo/odoo · module folder
Module version
0.1.0
Category
Extra Tools
Folder size
0.76 MB
License
LGPL-3
Application
No
Auto-installable
Yes
Website
None
Last tracking update
2026-08-15 22:44:15
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Aaron Bohy, Toufik Ben Jaa, Julien Castiaux, Julien Mougenot, std-odoo, Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, William Braeckman, Miquel Raïch, Ruben Gomes, Mathieu Walravens, Loan (LSE), Louis Wicket (wil), Thomas Lefebvre (thle), Dylan Kiss (dyki), bram1000, mega, thle-odoo, Andrea Manenti, Pierre Pulinckx, Bastien PIERRE, lse-odoo, Krzysztof Magusiak (krma), Omar (OSAH), kmdi-odoo, Rémy Voet
Odoo dependencies
odoo/odoo:
- web
Python dependencies
None
System dependencies
None
Required by
auth_timeout, auth_totp_mail, auth_totp_portal
Description
Two-Factor Authentication (TOTP)
================================
Allows users to configure two-factor authentication on their user account
for extra security, using time-based one-time passwords (TOTP).

Once enabled, the user will need to enter a 6-digit code as provided
by their authenticator app before being granted access to the system.
All popular authenticator apps are supported.

Note: logically, two-factor prevents password-based RPC access for users
where it is enabled. In order to be able to execute RPC scripts, the user
can setup API keys to replace their main password.
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
auth_totp_form Two-Factor Authentication ir.ui.view qweb New
res_users_view_search res.users.view.search.inherit.auth.totp res.users search Inherits base.view_users_search
view_totp_field users preference: totp res.users form Inherits base.view_users_form_simple_modif
view_totp_form user form: add totp status res.users form Inherits base.view_users_form
view_totp_wizard auth_totp wizard auth_totp.wizard form New
HTTP endpoints (1)
Route(s)HandlerAuthTypeMethodsFlags
/web/login/totp Home.web_totp public http GET, POST sudo website
Models touched (4)

New fields (3)
  • ip Char
    readonly=True
  • limit_type Selection
    readonly=True args: [('send_email', 'Send Email'), ('code_check', 'Code Checking')]
  • user_id Many2one → res.users
    readonly=True required=True args: 'res.users'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • code Char
    size=7 store=False string='Verification Code'
  • qrcode Binary
    attachment=False compute='_compute_qrcode' readonly=True store=True
  • secret Char
    readonly=True required=True
  • url Char
    compute='_compute_qrcode' readonly=True store=True
  • user_id Many2one → res.users
    readonly=True required=True args: 'res.users'
Public methods (1)
  • enable(self)
    @check_identity

New fields (4)
  • totp_enabled Boolean
    compute='_compute_totp_enabled' search='_totp_enable_search' string='Two-factor authentication'
  • totp_last_counter Integer
    copy=False groups=fields.NO_ACCESS
  • totp_secret Char
    compute='_compute_totp_secret' copy=False groups=fields.NO_ACCESS inverse='_inverse_token'
  • totp_trusted_device_ids One2many → auth_totp.device
    string='Trusted Devices' args: 'auth_totp.device', 'user_id'
Public methods (6)
  • SELF_READABLE_FIELDS(self)
    @property
  • action_totp_disable(self)
    @check_identity
  • action_totp_enable_wizard(self)
    @check_identity
  • change_password(self, old_passwd, new_passwd)
    @api.model
  • init(self)
  • revoke_all_devices(self)
    @check_identity

Loading…

Loading…

Loading…

Loading…

Loading…