Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 548 |
Technical Name |
it9_oauth2_server |
License | OPL-1 |
Website | https://github.com/superpkson |
Versions | 15.0 16.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 548 |
Technical Name |
it9_oauth2_server |
License | OPL-1 |
Website | https://github.com/superpkson |
Versions | 15.0 16.0 |
Standard OAuth2 Server
by IT9@2022Let your Odoo ERP be an authentication server. Other applications that supported OAuth2 can connect with your Odoo account.
- Users can sign in multiple apps with just a single account.
- Administrators can control all connected applications in one site.
- Developers can restrict what can be accessed by the collab applications.
How It Works
Please refer (https://oauth.net/2/) for more details about OAuth 2.0.
User Guide
This section will show you how to set up the OAuth2 server to let other sites/apps to access.

- Client Name: The name that can identify which application is it
- Logo: The URL of image that can identify the application
- Client Website: The URL of application
- Grant Types: Which type of authentication methods can be used by this application
- Redirect Uris: Which pages can be redirected to while processing grant type = "Authorization Code"
- Response Types: The result format of token response
- Scopes: This application can only access the Odoo resources which has this scope
- Token Expires in: The default expire period of token. The unit is seconds.
- Expired at: This application will not able to access after this date
The client ID and secret will not display while creating the record. You can find the ID after saved the record and get the secret by clicking the refresh button.
How to apply
Please read (https://oauth.net/2/) to realize which parameters need to be passed.
- Authorization Page
- GET {Your Odoo Server}/oauth/authorize
- e.g. http://localhost:8069/oauth/authorize
- Access Token
- POST {Your Odoo Server}/oauth/token
- e.g. http://localhost:8069/oauth/token
- Basic User Profile
- GET {Your Odoo Server}/oauth/profile
- e.g. http://localhost:8069/oauth/profile
Developer Guide
Please take a look for a reference at "/controllers/profile.py"

When building the interface for other applications, you can set the "auth" to "it9_oauth2_server" and define a new scope in the "@http.route". This addon will automatically verify the token and the permission.
CautionsIf you defined a new scope, please create a correlation record at model "oauth2.scope". After that, the administrators can assign the new scope to applications.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module
Report comment
Any abuse of this reporting system will be penalizedThere are no ratings yet!
Odoo 17 Version request
Is the Odoo 17 version of this module available? Thank you
odoo login
Hi, I have a question, please advice if this possible
2 odoo servers.
How to config one odoo to login as from this oauth server odoo.
Thank you.