Skip to content

triauth for OdooOIDC

Let your staff open Odoo with one approval on their own device, and no Odoo passwords.

  • Business and ERP
  • Open source
Sign-in through
OpenID Connect bridge
Available in
Self-hosted Odoo and Odoo.sh, with the OCA module
Set up in
Settings › Integrations › OAuth Providers

About Odoo

Odoo is a suite of business applications: accounting, CRM, sales, inventory, HR, website, and many more, run as one system. Companies use the free Community edition or the paid Enterprise edition, on their own servers, on Odoo.sh, or on Odoo's online service.

Connect Odoo to triauth

Odoo signs people in through the triauth OpenID Connect bridge, with the OpenID Connect module from the Odoo Community Association. Once connected, the login page shows a button with the label you choose. People on your team click it, type their username, and approve on their own device. Nobody keeps an Odoo password, and when someone leaves, removing their identity records at your domain ends their access to Odoo as well.

How it works

  1. Install the module Authentication OpenID Connect (auth_oidc) from the OCA server-auth repository into your Odoo, the way you install any community module. It needs the Python package python-jose on the server.

  2. Open oidc.triauth.org and enter your domain. Paste Odoo's redirect address, https://odoo.example.com/auth_oauth/signin with your own Odoo address in place of odoo.example.com, and click Connect app. The bridge gives you a client ID and a client secret.

  3. In Odoo, open Settings › General Settings › Integrations, turn on OAuth Authentication, click OAuth Providers, and create a provider with the fields below, with your domain in place of example.com.

    FieldValue
    Provider nameexample.com
    Auth FlowOpenID Connect (authorization code flow)
    Client ID and Client Secretfrom the bridge
    Allowedon
    Login button labelLog in with example.com
    Scopeopenid email profile
    Authorization URLhttps://oidc.triauth.org/example.com/authorize
    Token URLhttps://oidc.triauth.org/example.com/token
    JWKS URLhttps://oidc.triauth.org/example.com/jwks
  4. Under Settings › Users › Customer Account, choose Free sign up, or send each person an invitation link instead.

  5. Open the login page and click Log in with example.com.

Checkpoint

Odoo's login page shows Log in with example.com under the password form. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve.

Good to know

  • With Free sign up on, everyone with an identity at your domain gets an Odoo user the first time they sign in, with the rights of the default template user. To let only one team in, limit the app to a group when you connect it. Without free sign-up, people join through an invitation link and click the button there.
  • Odoo's online service cannot install community modules, so this works on your own server or on Odoo.sh.
  • Access rights stay in Odoo. The groups published at your domain are not used.

For the person who connects the app

SettingValue
Redirect addresshttps://<your Odoo base URL>/auth_oauth/signin, exactly on the host Odoo is served from
Where in OdooSettings › General Settings › Integrations › OAuth Providers, after the OCA module is installed
Addressesthe three addresses go in one by one, as above, since Odoo does not read the discovery document. The stock OAuth module alone does not work, since it uses the implicit flow
ClientOdoo keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge. It also works with the secret left empty, if you tick the box instead
End Session URLleave empty
Odoo's OAuth provider form with the Auth Flow, Token Map, Client Secret, Token URL, JWKS URL, and End Session URL fields added by the OCA module
The provider form with the OCA module installed. Source: the auth_oidc module README, AGPL-3.

The OCA module's README lists the fields for the authorization code flow, with Keycloak as its example.

Next steps

All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.