Odoo Community Association

Auth oauth configuration with server_environment

Beta License: AGPL-3 OCA/server-env Translate me on Weblate Try me on Runboat

This module extends the functionality of server environment to support OAuth providers, and allows you to enable providers and set client_id key according to environment. (Refer to module server_environment for more informations)

Table of contents

Installation

To install this module, you need to have the server_environment module installed and properly configured.

Configuration

To configure this module, you need to add a section [auth_oauth.provider_name] to you server_environment_files configurations, where ‘provider_name’ match the tech_name field on auth.oauth.provider.

‘provider_name’ is the first part (until first space character) in lower case of provider name. Using existing providers, it could be either provider_google, provider_openerp, or provider_facebook.

For example, if you want to activate Google and Odoo.com, your server_environment_files should look like this:

[auth_oauth.provider_google]
client_id=123456789101-abcdefghijklmnopqrstuvwxyz000000
enabled=True

[auth_oauth.provider_openerp]
enabled=True

Any provider not being enabled through server_environment_files will be set as disabled automatically.

If you want to define a new custom provider, you should pay attention to the tech name to use in the server_environment_files. If you create a provider with ‘provider_dummy’ as its tech_name, then the section should be named [auth_oauth.provider_dummy].

Usage

Once configured, Odoo will read from server_environment_files the following fields of auth.oauth.provider :

  • Allowed (enabled)
  • Client ID (client_id)

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Camptocamp SA

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/server-env project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.