UPDATED: Wed 30 Mar 2022 06:14:30 PM -04.
Configure to allow user to sign up using OAuth
- Odoo 13 CE.
First activate your Developer mode then you follow the steps, Then install the auth_oauth
module
More info: https://developers.facebook.com/products/facebook-login/
- Create an account at https://developers.facebook.com
- Create an App, https://developers.facebook.com ->
My apps
->Create app
2.1. Select the App Type
as Consumer
(Connect consumer permissions and products, such as Facebook login and basic Instagram viewing, to your app.)"
2.2. Select the App Details
> Name to show
enter Odoo App Auth
-> Create app
.
2.3. Add a product to you app and select Facebook Login
-> Configure
-> Web
.
- Tell us about your website ->
Website URL
"https://YOURDOMAIN/" ->Save
->Next
3.1. Configure the Facebook SDK for JavaScript
-> Copy and Paste
-> Next
Adapt the original source code needed for the Facebook SDK:
<!-- Facebook SDK - START --> <script> window.fbAsyncInit = function() { FB.init({ appId : '{your-app-id}', cookie : true, xfbml : true, version : '{api-version}' }); FB.AppEvents.logPageView(); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <!-- Facebook SDK - END -->
Please, changes the values of appId
and version
on the method FB.init()
used to initialize and setup the SDK
Now go to the ``Odoo Website Editor
-> Customize
-> HTML/CSS/JS Editor
-> Web Layout
then Copy and Paste the new source code at before the finish the header element, then click on Save
-> Close
buttons
Note: There is no need to download or install any separate files to use the Facebook SDK for JavaScript. You just need to include a short piece of JavaScript code in your HTML that will asynchronously load the SDK on your pages. Asynchronous loading of the SDK will not block loading of other elements on the page.
- Make sure the
Valid OAuth Redirect URIs
is set to https://YOURDOMAIN/auth_oauth/signin under "https://developers.facebook.com -> YOURAPP ->Products
->Facebook Login
->Settings
->Client OAuth Settings
and click on "Save changes" button. - Go to
App Review
->Permissions and Features
->public_profile
->Request Advanced Access
, then mark the checkbox item (I agree that any data I receive throughpublic_profile
will be used in accordance with the allowed usage.) and click onConfirm
button. - For finish you need change the App Mode from
Development
toActive
clicking on checkbox switch. - Get the Facebook app-id and set to your
Odoo
->Settings
->Users and companies
->OAuth Providers
->Facebook Graph
->Edit
-> enter theClient ID
and mark the checkbox itemEnabled
-> clickSave
button. - Now got to your login page https://YOURDOMAIN/web/login and clic on
Login with Facebook
.
Facebook Login is currently unavailable for this app as we are updating additional details for this app. Please try again later. https://stackoverflow.com/a/69486468/1439705
- Login User in odoo ERP with facebook https://www.youtube.com/watch?v=lA9vqv1-N9M
- Guide for How to setup sign in using Facebook to Odoo https://www.instant-erp.com/products/enterprise-resource-planning/odoo/guide-for-how-to-setup-sign-in-using-facebook-to-odoo
- Issues with oauth Facebook module OAuth2 Authentication odoo/odoo#29256 (comment)
- Como crear App ID and App Secret de Facebook para Social Login en WordPress: Crear App de Facebook https://www.youtube.com/watch?v=-b8B3XX_d9k