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

GitHub

Leer hoe je LibreChat configureert om GitHub te gebruiken voor gebruikersauthenticatie.

Een GitHub-applicatie aanmaken

image

GitHub Applicatieconfiguratie

  • Geef het een GitHub App name en stel je Homepage URL in
    • Voorbeeld voor localhost: http://localhost:3080
    • Voorbeeld voor een domein: https://example.com

image

  • Voeg een geldige Callback URL toe:
    • Voorbeeld voor localhost: http://localhost:3080/oauth/github/callback
    • Voorbeeld voor een domein: https://example.com/oauth/github/callback

image

  • Schakel het selectievakje met het label Active in de Webhook sectie uit

image

  • Scroll naar beneden naar Account permissions en stel Email addresses in op Access: Read-only

image

image

  • Klik op Create GitHub App

image

.env Configuratie

  • Klik op Generate a new client secret

image

  • Kopieer de Client ID en Client Secret in het .env bestand

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
  • Sla het .env bestand op

Let op: Als je Docker gebruikt, voer dan docker compose up -d uit om de wijzigingen in de .env configuratie toe te passen.

Hoe is deze gids?