mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-24 03:06:12 +01:00
🛂 feat: Required OpenID Role (#2279)
* feat: add possibility to filter by roles for OpenID provider --------- Co-authored-by: Sirius <siriusfrk@gmail.com>
This commit is contained in:
parent
49753a35e5
commit
1bafe80e78
11 changed files with 599 additions and 441 deletions
83
docs/install/configuration/OAuth2-and-OIDC/facebook.md
Normal file
83
docs/install/configuration/OAuth2-and-OIDC/facebook.md
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
title: Facebook
|
||||
description: Learn how to configure LibreChat to use Facebook for user authentication.
|
||||
weight: -8
|
||||
---
|
||||
|
||||
# Facebook - WIP
|
||||
|
||||
> ⚠️ **Warning: Work in progress, not currently functional**
|
||||
|
||||
> ❗ Note: Facebook Authentication will not work from `localhost`
|
||||
|
||||
## Create a Facebook Application
|
||||
|
||||
- Go to the **[Facebook Developer Portal](https://developers.facebook.com/)**
|
||||
|
||||
- Click on "My Apps" in the header menu
|
||||
|
||||

|
||||
|
||||
- Create a new application
|
||||
|
||||

|
||||
|
||||
- Select "Authenticate and request data from users with Facebook Login"
|
||||
|
||||

|
||||
|
||||
- Choose "No, I'm not creating a game"
|
||||
|
||||

|
||||
|
||||
- Provide an `app name` and `App contact email` and click `Create app`
|
||||
|
||||

|
||||
|
||||
## Facebook Application Configuration
|
||||
|
||||
- In the side menu, select "Use cases" and click "Customize" under "Authentication and account creation."
|
||||
|
||||

|
||||
|
||||
- Add the `email permission`
|
||||
|
||||

|
||||
|
||||
- Now click `Go to settings`
|
||||
|
||||

|
||||
|
||||
- Ensure that `Client OAuth login`, `Web OAuth login` and `Enforce HTTPS` are **enabled**.
|
||||
|
||||

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

|
||||
|
||||
- Click `Go back` and select `Basic` in the `App settings` tab
|
||||
|
||||

|
||||
|
||||
- Click "Show" next to the App secret.
|
||||
|
||||

|
||||
|
||||
## .env Configuration
|
||||
|
||||
- Copy the `App ID` and `App Secret` and paste them into the `.env` file as follows:
|
||||
|
||||
```bash
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue