Aller au contenu principal
Version 0.3Brouillon

Odoo

Protocol: OIDC Module: Built-in (auth_oauth) - available since Odoo 10; OIDC support since Odoo 16 Estimated time: 15-20 minutes Reference docs: Odoo - OAuth Authentication (opens in a new tab)

Prerequisites

  • Odoo 18 recommended (the steps below). Odoo 16-17 work the same way; Odoo 10-15 require manual provider entry without claim mapping.
  • Administrator access to Odoo settings, developer mode enabled (?debug=1)
  • Application registered with LuxID with redirect URI: https://your-odoo.com/auth_oauth/signin
  • Client ID and Client Secret from your LuxID registration

Step 1 - enable OAuth in Odoo

  1. Go to Settings > General Settings > Integrations
  2. Enable OAuth Authentication
  3. Save

Step 2 - locate the provider settings

Go to Settings > Technical > OAuth Providers (developer mode required).

Click Create to add a new provider.

Step 3 - field mapping

Odoo fieldValue to enter
Provider NameLuxID
Authentication URLhttps://login.luxid.lu/mga/sps/oauth/oauth20/authorize
Scopeopenid profile email
Validation URLhttps://login.luxid.lu/mga/sps/oauth/oauth20/userinfo
Data URLhttps://login.luxid.lu/mga/sps/oauth/oauth20/userinfo
Client IDYour Client ID from your LuxID registration
Client SecretYour Client Secret from your LuxID registration
AllowedTicked

Claim mapping (Odoo 16+)

In Odoo 16+, add claim mapping fields:

ClaimMaps to
subUser identifier (Odoo uses email as login; set login to email)
emailEmail
given_nameFirst name
family_nameLast name

Step 4 - test login

  1. Temporarily point the Authentication URL to https://login-uat.luxid.lu/mga/sps/oauth/oauth20/authorize
  2. Log out of Odoo and go to the login page
  3. The LuxID provider button should appear below the standard login form
  4. Click it and authenticate with your sandbox LuxID Account
  5. Verify the Odoo user is created with correct name and email

Step 5 - production checklist and common errors

Production checklist

  • Restore the Authentication URL to login.luxid.lu
  • Set the provider to Allowed in the provider list
  • Test with a real LuxID Account and verify the user record in Settings > Users
  • Confirm that users who log in via LuxID are assigned the correct Odoo access rights

Common errors

ErrorCauseFix
invalid_redirect_uriOdoo's callback URL not whitelistedWhitelist https://your-odoo.com/auth_oauth/signin with LuxID
Provider button does not appearOAuth Authentication not enabledEnable in Settings > General Settings
User created with no namegiven_name / family_name not in Claim TemplateAsk LuxID to add the claims to your Claim Template
500 error after redirectValidation URL unreachable from Odoo serverCheck network/firewall rules; the Odoo server must reach login.luxid.lu
Mise à jour le 2026-06-02