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

Facebook

了解如何配置 LibreChat 以使用 Facebook 进行用户身份验证。

⚠️ 警告:正在开发中,目前尚不可用

❗ 注意:Facebook 身份验证无法在 localhost 上运行

创建 Facebook 应用程序

image

  • 创建新应用

image

  • 选择“Authenticate and request data from users with Facebook Login”

image

  • 选择“No, I'm not creating a game”

image

  • 提供 app nameApp contact email,然后点击 Create app

image

Facebook 应用程序配置

  • 在侧边菜单中,选择“Use cases”,然后点击“Authentication and account creation”下方的“Customize”。

image

  • 添加 email permission

image

  • 现在点击 Go to settings

image

  • 确保 Client OAuth loginWeb OAuth loginEnforce HTTPS启用

image

  • 添加一个 Valid OAuth Redirect URIs 并点击“Save changes”
    • 域名示例:https://example.com/oauth/facebook/callback

image

  • 点击 Go back 并在 App settings 选项卡中选择 Basic

image

  • 点击 App secret 旁边的 "Show"。

image

.env 配置

  • 复制 App IDApp Secret 并将其粘贴到 .env 文件中,如下所示:
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
  • 保存 .env 文件。

注意:如果使用 Docker,请运行 docker compose up -d 以应用 .env 配置更改

这篇指南怎么样?