mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 17:00:15 +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
65
docs/install/configuration/OAuth2-and-OIDC/github.md
Normal file
65
docs/install/configuration/OAuth2-and-OIDC/github.md
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
---
|
||||
title: GitHub
|
||||
description: Learn how to configure LibreChat to use GitHub for user authentication.
|
||||
weight: -10
|
||||
---
|
||||
|
||||
# GitHub
|
||||
|
||||
## Create a GitHub Application
|
||||
|
||||
- Go to your **[Github Developer settings](https://github.com/settings/apps)**
|
||||
- Create a new Github app
|
||||
|
||||

|
||||
|
||||
## GitHub Application Configuration
|
||||
|
||||
- Give it a `GitHub App name` and set your `Homepage URL`
|
||||
- Example for localhost: `http://localhost:3080`
|
||||
- Example for a domain: `https://example.com`
|
||||
|
||||

|
||||
|
||||
- Add a valid `Callback URL`:
|
||||
- Example for localhost: `http://localhost:3080/oauth/github/callback`
|
||||
- Example for a domain: `https://example.com/oauth/github/callback`
|
||||
|
||||

|
||||
|
||||
- Uncheck the box labeled `Active` in the `Webhook` section
|
||||
|
||||

|
||||
|
||||
- Scroll down to `Account permissions` and set `Email addresses` to `Access: Read-only`
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
- Click on `Create GitHub App`
|
||||
|
||||

|
||||
|
||||
## .env Configuration
|
||||
|
||||
- Click `Generate a new client secret`
|
||||
|
||||

|
||||
|
||||
- Copy the `Client ID` and `Client Secret` in the `.env` file
|
||||
|
||||

|
||||
|
||||
```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
|
||||
|
||||
GITHUB_CLIENT_ID=your_client_id
|
||||
GITHUB_CLIENT_SECRET=your_client_secret
|
||||
GITHUB_CALLBACK_URL=/oauth/github/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