@lobehub/chat 0.145.6 → 0.145.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/docs/self-hosting/advanced/authentication.mdx +2 -0
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +2 -0
- package/docs/self-hosting/advanced/sso-providers/github.mdx +61 -0
- package/docs/self-hosting/advanced/sso-providers/github.zh-CN.mdx +61 -0
- package/docs/self-hosting/environment-variables/basic.mdx +22 -0
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +24 -0
- package/package.json +1 -1
- package/src/app/api/auth/next-auth.ts +11 -0
- package/src/app/chat/(desktop)/features/SideBar/index.tsx +1 -0
- package/src/app/market/_layout/Desktop/AgentDetail.tsx +1 -0
- package/src/config/server/app.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.145.7](https://github.com/lobehub/lobe-chat/compare/v0.145.6...v0.145.7)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-04-02**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix DraggablePanel bar interfere with the operation of the scrollbar.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix DraggablePanel bar interfere with the operation of the scrollbar, closes [#1775](https://github.com/lobehub/lobe-chat/issues/1775) ([4b7b243](https://github.com/lobehub/lobe-chat/commit/4b7b243))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 0.145.6](https://github.com/lobehub/lobe-chat/compare/v0.145.5...v0.145.6)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2024-04-02**</sup>
|
package/README.md
CHANGED
|
@@ -222,10 +222,10 @@ In addition, these plugins are not limited to news aggregation, but can also ext
|
|
|
222
222
|
|
|
223
223
|
| Recent Submits | Description |
|
|
224
224
|
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
225
|
+
| [Social Search](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-04-02**</sup> | The Social Search provides access to tweets, users, followers, images, media and more.<br/>`social` `twitter` `x` `search` |
|
|
225
226
|
| [Calendar Assistant](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-03-13**</sup> | A plugin to manage your calendar events # will auto generate i18n in workflow<br/>`calendar` `schedule` `will-auto-generate-i-18-n-in-workflow` |
|
|
226
227
|
| [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | Get realtime crypto price, BTC, ETH, BNB, and the latest insights.The latest coin news and airdrop opportunities.<br/>`crypto` `btc` `eth` `bnb` |
|
|
227
228
|
| [Bilibili](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Dive into Bilibili's vast content with features like keyword video search, replay access, interactive danmaku, trending video recommendations, and hot-search insights, all at your fingertips.<br/>`video` `bilibili` `search` |
|
|
228
|
-
| [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | Obtain game information and user reviews from Steam.<br/>`steam` `game` |
|
|
229
229
|
|
|
230
230
|
> 📊 Total plugins: [<kbd>**55**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
231
231
|
|
|
@@ -259,14 +259,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
259
259
|
|
|
260
260
|
<!-- AGENT LIST -->
|
|
261
261
|
|
|
262
|
-
| Recent Submits
|
|
263
|
-
|
|
|
264
|
-
| [
|
|
265
|
-
| [
|
|
266
|
-
| [
|
|
267
|
-
| [
|
|
262
|
+
| Recent Submits | Description |
|
|
263
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
264
|
+
| [CAN](https://chat-preview.lobehub.com/market?agent=code-anything-noproblem)<br/><sup>By **[HenryWu9998](https://github.com/HenryWu9998)** on **2024-03-31**</sup> | Experienced programmer skilled in multiple languages. Provides code solutions, guidance, and practical examples to help users achieve their programming goals. "I adore coding."<br/>`programming` `coding` `programming-assistance` `code-examples` `guidance` |
|
|
265
|
+
| [Blood Test Analyst](https://chat-preview.lobehub.com/market?agent=blood-analyst)<br/><sup>By **[SimoMay](https://github.com/SimoMay)** on **2024-03-27**</sup> | Skilled in analysing blood test results, providing clear feedback using emojis for easy understanding.<br/>`healthcare` `analysis` `results` `consulting` `summary` |
|
|
266
|
+
| [High EQ Flattery Assistant](https://chat-preview.lobehub.com/market?agent=gpts-big-fart-chat)<br/><sup>By **[MapleEve](https://github.com/MapleEve)** on **2024-03-27**</sup> | An expert in precise chat compliments, providing suitable praise and flattery<br/>`compliments` `eq` `chat` |
|
|
267
|
+
| [Suno.ai Music Creation Assistant](https://chat-preview.lobehub.com/market?agent=suno-music-creator)<br/><sup>By **[MapleEve](https://github.com/MapleEve)** on **2024-03-27**</sup> | Song creation and translation based on SunoAI<br/>`suno` `lyricist` `lyrics` `music-production` |
|
|
268
268
|
|
|
269
|
-
> 📊 Total agents: [<kbd>**
|
|
269
|
+
> 📊 Total agents: [<kbd>**225**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
270
270
|
|
|
271
271
|
<!-- AGENT LIST -->
|
|
272
272
|
|
package/README.zh-CN.md
CHANGED
|
@@ -214,10 +214,10 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
214
214
|
|
|
215
215
|
| 最近新增 | 插件描述 |
|
|
216
216
|
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
217
|
+
| [社交搜索](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **say-apps** on **2024-04-02**</sup> | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。<br/>`社交` `推特` `x` `搜索` |
|
|
217
218
|
| [日历助手](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **cc** on **2024-03-13**</sup> | 一个用于管理日历事件的插件 # 将自动生成工作流程中的 i18n<br/>`日历` `日程安排` `将自动生成工作流程中的-i-18-n` |
|
|
218
219
|
| [TokenInsights](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **feednews** on **2024-01-27**</sup> | 获取实时加密货币价格,BTC,ETH,BNB 和最新见解。最新的币新闻和空投机会。<br/>`加密货币` `btc` `eth` `bnb` |
|
|
219
220
|
| [哔哩哔哩](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 通过关键词视频搜索、回放访问、互动弹幕、热门视频推荐和热搜洞察等功能,深入体验哔哩哔哩丰富的内容,尽在您的指尖。<br/>`视频` `哔哩哔哩` `搜索` |
|
|
220
|
-
| [Steam](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2024-01-27**</sup> | 从 Steam 获取游戏信息和用户评论。<br/>`steam` `game` |
|
|
221
221
|
|
|
222
222
|
> 📊 Total plugins: [<kbd>**55**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
223
223
|
|
|
@@ -247,14 +247,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
247
247
|
|
|
248
248
|
<!-- AGENT LIST -->
|
|
249
249
|
|
|
250
|
-
| 最近新增 | 助手说明
|
|
251
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
252
|
-
| [
|
|
253
|
-
| [
|
|
254
|
-
| [
|
|
255
|
-
| [
|
|
250
|
+
| 最近新增 | 助手说明 |
|
|
251
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
252
|
+
| [CAN](https://chat-preview.lobehub.com/market?agent=code-anything-noproblem)<br/><sup>By **[HenryWu9998](https://github.com/HenryWu9998)** on **2024-03-31**</sup> | 有经验的程序员,精通多种编程语言。提供代码解决方案、指导和实际示例,帮助用户实现他们的编程目标。"我热爱编程。"<br/>`programming` `coding` `programming-assistance` `code-examples` `guidance` |
|
|
253
|
+
| [血液检测分析师](https://chat-preview.lobehub.com/market?agent=blood-analyst)<br/><sup>By **[SimoMay](https://github.com/SimoMay)** on **2024-03-27**</sup> | 擅长分析血液检测结果,使用表情符号提供清晰反馈,便于理解。<br/>`医疗保健` `分析` `结果` `咨询` `摘要` |
|
|
254
|
+
| [高情商马屁助手](https://chat-preview.lobehub.com/market?agent=gpts-big-fart-chat)<br/><sup>By **[MapleEve](https://github.com/MapleEve)** on **2024-03-27**</sup> | 精准的聊天夸赞专家,适宜的赞美和吹捧<br/>`夸赞` `情商` `聊天` |
|
|
255
|
+
| [Suno.ai 音乐创作助手](https://chat-preview.lobehub.com/market?agent=suno-music-creator)<br/><sup>By **[MapleEve](https://github.com/MapleEve)** on **2024-03-27**</sup> | 基于 SunoAI 的歌曲创作与翻译<br/>`suno` `作词` `歌词` `音乐制作` |
|
|
256
256
|
|
|
257
|
-
> 📊 Total agents: [<kbd>**
|
|
257
|
+
> 📊 Total agents: [<kbd>**225**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
258
258
|
|
|
259
259
|
<!-- AGENT LIST -->
|
|
260
260
|
|
|
@@ -7,6 +7,7 @@ Currently supported identity verification services include:
|
|
|
7
7
|
- [Auth0](/en/self-hosting/advanced/sso-providers/auth0)
|
|
8
8
|
- [Microsoft Entra ID](/en/self-hosting/advanced/sso-providers/microsoft-entra-id)
|
|
9
9
|
- [Authentik](/en/self-hosting/advanced/sso-providers/authentik)
|
|
10
|
+
- [Github](/en/self-hosting/advanced/sso-providers/github
|
|
10
11
|
|
|
11
12
|
Click on the links to view the corresponding platform's configuration documentation.
|
|
12
13
|
|
|
@@ -21,6 +22,7 @@ The order corresponds to the display order of the SSO providers.
|
|
|
21
22
|
| Auth0 | `auth0` |
|
|
22
23
|
| Microsoft Entra ID | `azure-ad` |
|
|
23
24
|
| Authentik | `authentik` |
|
|
25
|
+
| Github | `github` |
|
|
24
26
|
|
|
25
27
|
## Other SSO Providers
|
|
26
28
|
|
|
@@ -7,6 +7,7 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
|
|
|
7
7
|
- [Auth0](/zh/self-hosting/advanced/sso-providers/auth0)
|
|
8
8
|
- [Microsoft Entra ID](/zh/self-hosting/advanced/sso-providers/microsoft-entra-id)
|
|
9
9
|
- [Authentik](/zh/self-hosting/advanced/sso-providers/authentik)
|
|
10
|
+
- [Github](/zh/self-hosting/advanced/sso-providers/github)
|
|
10
11
|
|
|
11
12
|
点击链接可以查看对应平台的配置文档。
|
|
12
13
|
|
|
@@ -21,6 +22,7 @@ LobeChat 支持配置外部身份验证服务,供企业 / 组织内部使用
|
|
|
21
22
|
| Auth0 | `auth0` |
|
|
22
23
|
| Microsoft Entra ID | `azure-ad` |
|
|
23
24
|
| Authentik | `authentik` |
|
|
25
|
+
| Github | `github` |
|
|
24
26
|
|
|
25
27
|
## 其他 SSO 提供商
|
|
26
28
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Configuring Github Authentication Service
|
|
2
|
+
|
|
3
|
+
## Github Configuration Process
|
|
4
|
+
|
|
5
|
+
<Steps>
|
|
6
|
+
### Create a Github Provider
|
|
7
|
+
|
|
8
|
+
Click [here][github-create-app] to create a new Github App.
|
|
9
|
+
|
|
10
|
+
Fill in the Github App name, Homepage URL, and Callback URL.
|
|
11
|
+
|
|
12
|
+
<Image alt="Create a Github Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
|
|
13
|
+
|
|
14
|
+
Set the webhook callback URL according to your needs.
|
|
15
|
+
|
|
16
|
+
<Image alt="Fill in other fields" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
|
|
17
|
+
|
|
18
|
+
Set the permission to read email addresses.
|
|
19
|
+
|
|
20
|
+
<Image alt="Set required permissions" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
|
|
21
|
+
<Image alt="Set permission to read email addresses" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
|
|
22
|
+
|
|
23
|
+
Set whether it is accessible publicly or only accessible to yourself.
|
|
24
|
+
|
|
25
|
+
<Image alt="Set whether it is accessible publicly or only accessible to yourself" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
|
|
26
|
+
|
|
27
|
+
Click "Create Github App".
|
|
28
|
+
|
|
29
|
+
After successful creation, click "Generate a new client secret" to create a client secret.
|
|
30
|
+
|
|
31
|
+
<Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
|
|
32
|
+
|
|
33
|
+
After successful creation, save the `Client ID` and `Client Secret`.
|
|
34
|
+
|
|
35
|
+
<Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
|
|
36
|
+
|
|
37
|
+
### Configure Environment Variables
|
|
38
|
+
|
|
39
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
|
40
|
+
|
|
41
|
+
| Environment Variable | Type | Description |
|
|
42
|
+
| ---------------------- | ---- | ------------------------------------------------------------------------------------------ |
|
|
43
|
+
| `ENABLE_OAUTH_SSO` | Required | Enable Single Sign-On (SSO) for LobeChat. Set to `1` to enable SSO. |
|
|
44
|
+
| `NEXTAUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
|
|
45
|
+
| `SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. |
|
|
46
|
+
| `GITHUB_CLIENT_ID` | Required | Client ID in the Github App details page. |
|
|
47
|
+
| `GITHUB_CLIENT_SECRET` | Required | Client Secret in the Github App details page. |
|
|
48
|
+
| `ACCESS_CODE` | Required | Add a password for accessing this service. You can set a long random password to "disable" access code authorization. |
|
|
49
|
+
| `NEXTAUTH_URL` | Optional | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
|
50
|
+
|
|
51
|
+
<Callout type={'tip'}>
|
|
52
|
+
Go to [📘 Environment Variables](/en/self-hosting/environment-variable#Github) for detailed information on these variables.
|
|
53
|
+
</Callout>
|
|
54
|
+
|
|
55
|
+
</Steps>
|
|
56
|
+
|
|
57
|
+
<Callout type={'info'}>
|
|
58
|
+
After successful deployment, users will be able to authenticate with Github and use LobeChat.
|
|
59
|
+
</Callout>
|
|
60
|
+
|
|
61
|
+
[github-create-app]: https://github.com/settings/apps/new
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# 配置 Github 身份验证服务
|
|
2
|
+
|
|
3
|
+
## Github 配置流程
|
|
4
|
+
|
|
5
|
+
<Steps>
|
|
6
|
+
### 创建 Github 提供应用
|
|
7
|
+
|
|
8
|
+
点击[这里][github-create-app]创建一个新的Gituhb App。
|
|
9
|
+
|
|
10
|
+
填写Github App name、Homepage URL、Callbak URL
|
|
11
|
+
|
|
12
|
+
<Image alt="创建 Github 提供程序" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
|
|
13
|
+
|
|
14
|
+
按照自己所需设置Webhook回调地址
|
|
15
|
+
|
|
16
|
+
<Image alt="填写其他字段" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
|
|
17
|
+
|
|
18
|
+
设置读取邮件地址权限
|
|
19
|
+
|
|
20
|
+
<Image alt="设置所需权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
|
|
21
|
+
<Image alt="设置读取邮件地址权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
|
|
22
|
+
|
|
23
|
+
设置公开访问还是仅自己访问
|
|
24
|
+
|
|
25
|
+
<Image alt="设置公开访问还是仅自己访问" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
|
|
26
|
+
|
|
27
|
+
点击「Create Github App」
|
|
28
|
+
|
|
29
|
+
创建成功后,点击「Generate a new client secret」创建客户端Secret
|
|
30
|
+
|
|
31
|
+
<Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
|
|
32
|
+
|
|
33
|
+
创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
|
|
34
|
+
|
|
35
|
+
<Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
|
|
36
|
+
|
|
37
|
+
### 配置环境变量
|
|
38
|
+
|
|
39
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
|
40
|
+
|
|
41
|
+
| 环境变量 | 类型 | 描述 |
|
|
42
|
+
| ------------------------ | -- | ------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `ENABLE_OAUTH_SSO` | 必选 | 为 LobeChat 启用单点登录 (SSO)。设置为 `1` 以启用单点登录。 |
|
|
44
|
+
| `NEXTAUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
|
45
|
+
| `SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
|
46
|
+
| `GITHUB_CLIENT_ID` | 必选 | Github App详情页的 客户端 ID |
|
|
47
|
+
| `GITHUB_CLIENT_SECRET` | 必选 | Github App详情页的 客户端 Secret |
|
|
48
|
+
| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个足够长的随机密码以 “禁用” 访问码授权 |
|
|
49
|
+
| `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
|
50
|
+
|
|
51
|
+
<Callout type={'tip'}>
|
|
52
|
+
前往 [📘 环境变量](/zh/self-hosting/environment-variable#Github) 可查阅相关变量详情。
|
|
53
|
+
</Callout>
|
|
54
|
+
</Steps>
|
|
55
|
+
|
|
56
|
+
<Callout type={'info'}>
|
|
57
|
+
部署成功后,用户将可以通过Github身份认证并使用 LobeChat。
|
|
58
|
+
</Callout>
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
[github-create-app]: https://github.com/settings/apps/new
|
|
@@ -168,6 +168,27 @@ Further reading:
|
|
|
168
168
|
- Default: `-`
|
|
169
169
|
- Example: `https://your-authentik-domain.com/application/o/slug/`
|
|
170
170
|
|
|
171
|
+
### Github
|
|
172
|
+
|
|
173
|
+
<Callout>
|
|
174
|
+
Currently, we only support the Auth0, Microsoft Entra ID, Authentik, Github identity verification service providers.
|
|
175
|
+
If you need to use other identity verification service providers, you can submit a [feature request](https://github.com/lobehub/lobe-chat/issues/new/choose) or Pull Request.
|
|
176
|
+
</Callout>
|
|
177
|
+
|
|
178
|
+
#### `GITHUB_CLIENT_ID`
|
|
179
|
+
|
|
180
|
+
- Type: Required
|
|
181
|
+
- Description: Client ID of the Github application. You can access it [here][github-client-page] and navigate to the application settings to view.
|
|
182
|
+
- Default: `-`
|
|
183
|
+
- Example: `abd94200333283550508`
|
|
184
|
+
|
|
185
|
+
#### `GITHUB_CLIENT_SECRET`
|
|
186
|
+
|
|
187
|
+
- Type: Required
|
|
188
|
+
- Description: Client Secret of the Github application.
|
|
189
|
+
- Default: `-`
|
|
190
|
+
- Example: `dd262976ac0931d947e104891586a053f3d3750b`
|
|
191
|
+
|
|
171
192
|
## Plugin Service
|
|
172
193
|
|
|
173
194
|
### `PLUGINS_INDEX_URL`
|
|
@@ -206,3 +227,4 @@ The above example sets the `SERPAPI_API_KEY` of the `search-engine` plugin to `x
|
|
|
206
227
|
- Default: `https://chat-agents.lobehub.com`
|
|
207
228
|
|
|
208
229
|
[auth0-client-page]: https://manage.auth0.com/dashboard
|
|
230
|
+
[github-client-page]: https://github.com/settings/apps
|
|
@@ -167,6 +167,29 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
|
|
|
167
167
|
- 默认值: `-`
|
|
168
168
|
- 示例: `https://your-authentik-domain.com/application/o/slug/`
|
|
169
169
|
|
|
170
|
+
|
|
171
|
+
### Github
|
|
172
|
+
|
|
173
|
+
<Callout>
|
|
174
|
+
目前,我们仅支持 Auth0,Microsoft Entra ID,Authentik,Github 作为身份验证服务提供商。如果您需要使用其他身份验证服务提供商,可以提交
|
|
175
|
+
[功能请求](https://github.com/lobehub/lobe-chat/issues/new/choose) 或 Pull Request。
|
|
176
|
+
</Callout>
|
|
177
|
+
|
|
178
|
+
#### `GITHUB_CLIENT_ID`
|
|
179
|
+
|
|
180
|
+
- Type: Required
|
|
181
|
+
- Description: Github应用的客户端ID。您可以在[这里][github-client-page]访问,并导航到应用程序设置以查看。
|
|
182
|
+
- Default: `-`
|
|
183
|
+
- Example: `abd94200333283550508`
|
|
184
|
+
|
|
185
|
+
#### `GITHUB_CLIENT_SECRET`
|
|
186
|
+
|
|
187
|
+
- Type: Required
|
|
188
|
+
- Description: Github应用的客户端密钥。
|
|
189
|
+
- Default: `-`
|
|
190
|
+
- Example: `dd262976ac0931d947e104891586a053f3d3750b`
|
|
191
|
+
|
|
192
|
+
|
|
170
193
|
## 插件服务
|
|
171
194
|
|
|
172
195
|
### `PLUGINS_INDEX_URL`
|
|
@@ -205,3 +228,4 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
|
|
|
205
228
|
- 默认值:`https://chat-agents.lobehub.com`
|
|
206
229
|
|
|
207
230
|
[auth0-client-page]: https://manage.auth0.com/dashboard
|
|
231
|
+
[github-client-page]: https://github.com/settings/apps
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.145.
|
|
3
|
+
"version": "0.145.7",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -2,6 +2,7 @@ import NextAuth from 'next-auth';
|
|
|
2
2
|
import Auth0 from 'next-auth/providers/auth0';
|
|
3
3
|
import Authentik from 'next-auth/providers/authentik';
|
|
4
4
|
import AzureAd from 'next-auth/providers/azure-ad';
|
|
5
|
+
import Github from 'next-auth/providers/github';
|
|
5
6
|
|
|
6
7
|
import { getServerConfig } from '@/config/server';
|
|
7
8
|
|
|
@@ -11,6 +12,8 @@ const {
|
|
|
11
12
|
AUTH0_CLIENT_ID,
|
|
12
13
|
AUTH0_CLIENT_SECRET,
|
|
13
14
|
AUTH0_ISSUER,
|
|
15
|
+
GITHUB_CLIENT_ID,
|
|
16
|
+
GITHUB_CLIENT_SECRET,
|
|
14
17
|
AZURE_AD_CLIENT_ID,
|
|
15
18
|
AZURE_AD_CLIENT_SECRET,
|
|
16
19
|
AZURE_AD_TENANT_ID,
|
|
@@ -59,6 +62,14 @@ const nextAuth = NextAuth({
|
|
|
59
62
|
issuer: AUTH0_ISSUER,
|
|
60
63
|
});
|
|
61
64
|
}
|
|
65
|
+
case 'github': {
|
|
66
|
+
return Github({
|
|
67
|
+
// Specify auth scope, at least include 'openid email'
|
|
68
|
+
authorization: { params: { scope: 'read:user user:email' } },
|
|
69
|
+
clientId: GITHUB_CLIENT_ID,
|
|
70
|
+
clientSecret: GITHUB_CLIENT_SECRET,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
62
73
|
case 'azure-ad': {
|
|
63
74
|
return AzureAd({
|
|
64
75
|
// Specify auth scope, at least include 'openid email'
|
package/src/config/server/app.ts
CHANGED
|
@@ -62,6 +62,8 @@ export const getAppConfig = () => {
|
|
|
62
62
|
AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID || '',
|
|
63
63
|
AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET || '',
|
|
64
64
|
AUTH0_ISSUER: process.env.AUTH0_ISSUER || '',
|
|
65
|
+
GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID || '',
|
|
66
|
+
GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET || '',
|
|
65
67
|
AZURE_AD_CLIENT_ID: process.env.AZURE_AD_CLIENT_ID || '',
|
|
66
68
|
AZURE_AD_CLIENT_SECRET: process.env.AZURE_AD_CLIENT_SECRET || '',
|
|
67
69
|
AZURE_AD_TENANT_ID: process.env.AZURE_AD_TENANT_ID || '',
|