Integrating Facebook as an authentication provider in Odoo17 can streamline the login process for portal users by allowing them to use their Facebook credentials to log in.
Introduction
Integrating Facebook as an authentication provider in Odoo17 offers numerous benefits, including simplifying the login process for users and enhancing security by leveraging Facebook's authentication mechanisms. This integration allows users to use their existing Facebook credentials to log into the Odoo17 system, which can improve user convenience and potentially increase user engagement by reducing the need for remembering additional passwords.
Configuration
To sign in to Odoo 17 using a Facebook account, follow these steps: First, visit Facebook for Developers and log in with your Facebook account.
After logging in, click on "Create App" to add a new app.
After clicking on it, you will be redirected to select an option indicating what the app will be used for. Choose the option "Others".
After that, you can choose the app type as “Consumer” from the list.
Then provide a name for your App and create the App
After creating the App you can see a new window in the dashboard to add the products for your App.
From the above screenshot, you can see the different products for the App. Choose the product “Facebook Login” from the products.
Configure App basic settings
Go to the App Settings tab -> Basic
Keep the App ID. You need to fill in the following fields while configuring the basic settings:
* App Domain: Provide your Odoo17 instance domain as https://your-odoo-domain.com/.
* Privacy Policy URL: Provide a valid privacy policy URL. You can create the privacy policy from https://app.privacypolicies.com.
* User Data Deletion: Provide the user data deletion URL. This URL usually looks like https://your-odoo-domain.com/auth_oauth/signin.
* Category: Choose the category for the App.
Configure OAuth Redirect URI
In the Facebook Login settings, go to "Settings" under the Facebook Login product.
Enter the OAuth redirect URI provided by Odoo17 in the "Valid OAuth Redirect URIs" field. This URI usually looks like https://your-odoo-domain.com/auth_oauth/signin. and
Save the changes.
Ensure that the App Mode is turned from Development into Live.
After configuring your Facebook developer account, the next step is to set up the authentication provider in Odoo17.
Configure Odoo
To install the Auth OAuth module, begin by logging in to your Odoo17 backend. Once logged in, navigate to the "Apps" section in the main menu. From there, search for "Auth OAuth" and proceed to install the "OAuth Authentication" module. This module is essential for enabling OAuth-based authentication within your Odoo17 instance, allowing you to integrate external authentication providers such as Facebook.
To add Facebook as an OAuth provider, start by accessing the "Settings" section from the main menu in your Odoo17 instance. Within the "Users & Companies" menu, locate the "OAuth Providers" section, and click on it to proceed. Here, you'll find the Facebook Graph Provider listed. Open the provider configuration to begin setting up Facebook as an OAuth authentication option for your Odoo17 users. This process involves entering your Facebook App ID and App Secret, along with configuring other necessary details to establish the connection between Odoo17 and Facebook's authentication system.
Provide the App ID that you received while configuring the Facebook developer account and paste it into the Client ID field. And also enable the Allowed boolean.
After configuring it, you can go to the login page, and there you will see the new option to log in with Facebook.
Integrating Facebook as an authentication option in Odoo17 makes it easier for users to log in using their Facebook accounts. This means they don't have to create new usernames and passwords for Odoo17. By following the steps provided, you can set up this integration smoothly. It enhances security and makes the login process more convenient for users, ultimately improving their experience with Odoo 17.
To read more about How to Integrate Facebook Messenger in Odoo 16 App, refer to our blog How to Integrate Facebook Messenger in Odoo 16 App.