LibreChat/docs/install/configuration/OAuth2-and-OIDC/facebook.md
Danny Avila 1bafe80e78
🛂 feat: Required OpenID Role (#2279)
* feat: add possibility to filter by roles for OpenID provider

---------

Co-authored-by: Sirius <siriusfrk@gmail.com>
2024-04-02 03:08:17 -04:00

2.9 KiB

title description weight
Facebook Learn how to configure LibreChat to use Facebook for user authentication. -8

Facebook - WIP

⚠️ Warning: Work in progress, not currently functional

Note: Facebook Authentication will not work from localhost

Create a Facebook Application

image

  • Create a new application

image

  • Select "Authenticate and request data from users with Facebook Login"

image

  • Choose "No, I'm not creating a game"

image

  • Provide an app name and App contact email and click Create app

image

Facebook Application Configuration

  • In the side menu, select "Use cases" and click "Customize" under "Authentication and account creation."

image

  • Add the email permission

image

  • Now click Go to settings

image

  • Ensure that Client OAuth login, Web OAuth login and Enforce HTTPS are enabled.

image

  • Add a Valid OAuth Redirect URIs and "Save changes"
    • Example for a domain: https://example.com/oauth/facebook/callback

image

  • Click Go back and select Basic in the App settings tab

image

  • Click "Show" next to the App secret.

image

.env Configuration

  • Copy the App ID and App Secret and paste them into the .env file as follows:
DOMAIN_CLIENT=https://your-domain.com # use http://localhost:3080 if not using a custom domain
DOMAIN_SERVER=https://your-domain.com # use http://localhost:3080 if not using a custom domain

FACEBOOK_CLIENT_ID=your_app_id
FACEBOOK_CLIENT_SECRET=your_app_secret
FACEBOOK_CALLBACK_URL=/oauth/facebook/callback
  • Save the .env file.

Note: If using docker, run docker compose up -d to apply the .env configuration changes