diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/auth_oauth/data | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/auth_oauth/data')
| -rw-r--r-- | addons/auth_oauth/data/auth_oauth_data.xml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/addons/auth_oauth/data/auth_oauth_data.xml b/addons/auth_oauth/data/auth_oauth_data.xml new file mode 100644 index 00000000..b6579cd8 --- /dev/null +++ b/addons/auth_oauth/data/auth_oauth_data.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <record id="provider_openerp" model="auth.oauth.provider"> + <field name="name">Odoo.com Accounts</field> + <field name="auth_endpoint">https://accounts.odoo.com/oauth2/auth</field> + <field name="scope">userinfo</field> + <field name="validation_endpoint">https://accounts.odoo.com/oauth2/tokeninfo</field> + <field name="data_endpoint"></field> + <field name="css_class">fa fa-fw o_custom_icon</field> + <field name="body">Log in with Odoo.com</field> + <field name="enabled" eval="True"/> + </record> + <record id="provider_facebook" model="auth.oauth.provider"> + <field name="name">Facebook Graph</field> + <field name="auth_endpoint">https://www.facebook.com/dialog/oauth</field> + <field name="scope">public_profile,email</field> + <field name="validation_endpoint">https://graph.facebook.com/me</field> + <field name="data_endpoint">https://graph.facebook.com/me?fields=id,name,email</field> + <field name="css_class">fa fa-fw fa-facebook-square</field> + <field name="body">Log in with Facebook</field> + </record> + <record id="provider_google" model="auth.oauth.provider"> + <field name="name">Google OAuth2</field> + <field name="auth_endpoint">https://accounts.google.com/o/oauth2/auth</field> + <field name="scope">https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile</field> + <field name="validation_endpoint">https://www.googleapis.com/oauth2/v1/tokeninfo</field> + <field name="data_endpoint">https://www.googleapis.com/oauth2/v1/userinfo</field> + <field name="css_class">fa fa-fw fa-google</field> + <field name="body">Log in with Google</field> + </record> + + <!-- Use database uuid as client_id for OpenERP oauth provider --> + <function model="auth.oauth.provider" name="write"> + <value eval="[ref('auth_oauth.provider_openerp')]"/> + <value model="ir.config_parameter" eval="{ + 'client_id': obj().env['ir.config_parameter'].get_param('database.uuid'), + }"/> + </function> + </data> +</odoo> |
