Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

GitHub

Apprenez à configurer LibreChat pour utiliser GitHub pour l'authentification des utilisateurs.

Créer une application GitHub

image

Configuration de l'application GitHub

  • Donnez-lui un GitHub App name et définissez votre Homepage URL
    • Exemple pour localhost : http://localhost:3080
    • Exemple pour un domaine : https://example.com

image

  • Ajoutez une Callback URL valide :
    • Exemple pour localhost : http://localhost:3080/oauth/github/callback
    • Exemple pour un domaine : https://example.com/oauth/github/callback

image

  • Décochez la case intitulée Active dans la section Webhook

image

  • Faites défiler jusqu'à Account permissions et réglez Email addresses sur Access: Read-only

image

image

  • Cliquez sur Create GitHub App

image

Configuration de .env

  • Cliquez sur Generate a new client secret

image

  • Copiez le Client ID et le Client Secret dans le fichier .env

image

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
 
# GitHub Enterprise (optional)
# Uncomment and configure the following if you are using GitHub Enterprise for authentication
# GITHUB_ENTERPRISE_BASE_URL=https://your-ghe-instance.com
# GITHUB_ENTERPRISE_USER_AGENT=YourEnterpriseAppName
  • Enregistrez le fichier .env

Remarque : Si vous utilisez Docker, exécutez docker compose up -d pour appliquer les modifications de configuration du fichier .env

Que pensez-vous de ce guide ?