@lobehub/chat 1.33.4 → 1.33.5
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/.i18nrc.js +8 -2
- package/.releaserc.js +10 -1
- package/CHANGELOG.md +26 -16624
- package/changelog/CHANGELOG.v0.md +16621 -0
- package/changelog/v0.json +6064 -0
- package/changelog/v1.json +3347 -0
- package/docs/changelog/2024-11-25-november-providers.mdx +19 -0
- package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +17 -0
- package/docs/changelog/index.json +12 -0
- package/docs/changelog/schema.json +70 -0
- package/docs/self-hosting/advanced/auth/clerk.mdx +19 -23
- package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +5 -4
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +2 -4
- package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +3 -5
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +2 -2
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +49 -44
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +42 -41
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +29 -21
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +2 -1
- package/docs/self-hosting/advanced/auth.mdx +10 -10
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +10 -10
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/model-list.mdx +1 -1
- package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +17 -12
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +33 -20
- package/docs/self-hosting/advanced/s3.mdx +31 -28
- package/docs/self-hosting/advanced/s3.zh-CN.mdx +1 -0
- package/docs/self-hosting/advanced/webrtc.mdx +1 -0
- package/docs/self-hosting/environment-variables/s3.mdx +4 -3
- package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +1 -0
- package/docs/self-hosting/environment-variables.mdx +6 -9
- package/docs/self-hosting/platform/alibaba-cloud.mdx +1 -2
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +1 -2
- package/docs/self-hosting/platform/btpanel.mdx +7 -13
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +8 -13
- package/docs/self-hosting/platform/docker.zh-CN.mdx +2 -1
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +2 -1
- package/docs/self-hosting/server-database/docker.mdx +18 -5
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +9 -6
- package/docs/self-hosting/server-database/netlify.mdx +0 -1
- package/docs/self-hosting/server-database/railway.mdx +0 -1
- package/docs/self-hosting/server-database/repocloud.mdx +5 -2
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +23 -3
- package/docs/self-hosting/server-database/sealos.mdx +3 -0
- package/docs/self-hosting/server-database/vercel.mdx +35 -32
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +25 -25
- package/docs/self-hosting/server-database/zeabur.mdx +2 -2
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +3 -4
- package/docs/self-hosting/server-database.mdx +23 -8
- package/docs/self-hosting/start.mdx +8 -2
- package/docs/usage/features/database.zh-CN.mdx +1 -1
- package/docs/usage/foundation/text2image.mdx +1 -2
- package/docs/usage/foundation/text2image.zh-CN.mdx +1 -3
- package/docs/usage/providers/ai21.mdx +14 -15
- package/docs/usage/providers/ai21.zh-CN.mdx +1 -3
- package/docs/usage/providers/ai360.mdx +14 -15
- package/docs/usage/providers/ai360.zh-CN.mdx +1 -3
- package/docs/usage/providers/cloudflare.mdx +1 -1
- package/docs/usage/providers/fireworksai.mdx +19 -19
- package/docs/usage/providers/fireworksai.zh-CN.mdx +1 -3
- package/docs/usage/providers/github.mdx +22 -21
- package/docs/usage/providers/github.zh-CN.mdx +6 -6
- package/docs/usage/providers/hunyuan.mdx +17 -18
- package/docs/usage/providers/hunyuan.zh-CN.mdx +1 -3
- package/docs/usage/providers/siliconcloud.mdx +14 -15
- package/docs/usage/providers/siliconcloud.zh-CN.mdx +3 -5
- package/docs/usage/providers/spark.mdx +17 -18
- package/docs/usage/providers/spark.zh-CN.mdx +1 -3
- package/docs/usage/providers/upstage.mdx +14 -15
- package/docs/usage/providers/upstage.zh-CN.mdx +1 -3
- package/docs/usage/providers/wenxin.mdx +17 -18
- package/docs/usage/providers/wenxin.zh-CN.mdx +1 -3
- package/docs/usage/providers/zeroone.mdx +2 -2
- package/locales/ar/providers.json +3 -0
- package/locales/bg-BG/providers.json +3 -0
- package/locales/de-DE/providers.json +3 -0
- package/locales/en-US/providers.json +3 -0
- package/locales/es-ES/providers.json +3 -0
- package/locales/fa-IR/providers.json +3 -0
- package/locales/fr-FR/providers.json +3 -0
- package/locales/it-IT/providers.json +3 -0
- package/locales/ja-JP/providers.json +3 -0
- package/locales/ko-KR/providers.json +3 -0
- package/locales/nl-NL/providers.json +3 -0
- package/locales/pl-PL/providers.json +3 -0
- package/locales/pt-BR/providers.json +3 -0
- package/locales/ru-RU/providers.json +3 -0
- package/locales/tr-TR/providers.json +3 -0
- package/locales/vi-VN/providers.json +3 -0
- package/locales/zh-CN/providers.json +3 -0
- package/locales/zh-TW/providers.json +3 -0
- package/package.json +6 -1
- package/scripts/changelogWorkflow/buildStaticChangelog.ts +135 -0
- package/scripts/changelogWorkflow/const.ts +11 -0
- package/scripts/changelogWorkflow/index.ts +10 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
title: New Model Providers Added to LobeChat in November
|
3
|
+
description: >-
|
4
|
+
LobeChat model providers now support Gitee AI, InternLM (ShuSheng PuYu), xAI,
|
5
|
+
and Cloudflare WorkersAI
|
6
|
+
---
|
7
|
+
|
8
|
+
# Exciting New Additions to LobeChat's Model Providers This November! 🎉
|
9
|
+
|
10
|
+
Wow, it looks like our AI family has welcomed some new members! This November, we are thrilled to introduce these shining new AI model providers:
|
11
|
+
|
12
|
+
- **Gitee AI**: [https://ai.gitee.com](https://ai.gitee.com)
|
13
|
+
- **InternLM**: [https://internlm.intern-ai.org.cn](https://internlm.intern-ai.org.cn)
|
14
|
+
- **xAI**: [https://x.ai](https://x.ai)
|
15
|
+
- **Cloudflare WorkersAI**: [https://developers.cloudflare.com/workers-ai](https://developers.cloudflare.com/workers-ai)
|
16
|
+
|
17
|
+
We are always listening. Do you need support for more model providers?
|
18
|
+
|
19
|
+
- Please visit [More Model Providers Support](https://github.com/lobehub/lobe-chat/discussions/1284) to submit your requests.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
title: LobeChat 11 月新增模型服务
|
3
|
+
description: 'LobeChat 模型服务新增支持 Gitee AI, InternLM (书生浦语), xAI, Cloudflare WorkersAI'
|
4
|
+
---
|
5
|
+
|
6
|
+
# LobeChat 11 月模型服务又添新成员啦! 🎉
|
7
|
+
|
8
|
+
哇哦, 看来我们的 AI 大家庭又迎来了新成员! 在 11 月份,我们为你带来了这些闪亮登场的 AI 模型服务:
|
9
|
+
|
10
|
+
- **Gitee AI**: [https://ai.gitee.com](https://ai.gitee.com)
|
11
|
+
- **InternLM (书生浦语)**: [https://internlm.intern-ai.org.cn](https://internlm.intern-ai.org.cn)
|
12
|
+
- **xAI**: [https://x.ai](https://x.ai)
|
13
|
+
- **Cloudflare WorkersAI**: [https://developers.cloudflare.com/workers-ai](https://developers.cloudflare.com/workers-ai)
|
14
|
+
|
15
|
+
我们始终在倾听,需要支持更多的模型服务?
|
16
|
+
|
17
|
+
- 请前往 [更多模型服务商支持](https://github.com/lobehub/lobe-chat/discussions/1284) 提交您的需求
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "https://github.com/lobehub/lobe-chat/blob/main/docs/changelog/schema.json",
|
3
|
+
"cloud": [],
|
4
|
+
"community": [
|
5
|
+
{
|
6
|
+
"image": "https://github.com/user-attachments/assets/fa8fab19-ace2-4f85-8428-a3a0e28845bb",
|
7
|
+
"id": "2024-11-25-november-providers",
|
8
|
+
"date": "2024-11-25",
|
9
|
+
"versionRange": ["1.33.0", "1.30.0"]
|
10
|
+
}
|
11
|
+
]
|
12
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"additionalProperties": false,
|
4
|
+
"properties": {
|
5
|
+
"$schema": {
|
6
|
+
"type": "string",
|
7
|
+
"format": "uri"
|
8
|
+
},
|
9
|
+
"community": {
|
10
|
+
"type": "array",
|
11
|
+
"items": {
|
12
|
+
"type": "object",
|
13
|
+
"properties": {
|
14
|
+
"image": {
|
15
|
+
"type": "string"
|
16
|
+
},
|
17
|
+
"date": {
|
18
|
+
"type": "string",
|
19
|
+
"pattern": "^\\d+-\\d+-\\d+$"
|
20
|
+
},
|
21
|
+
"id": {
|
22
|
+
"type": "string"
|
23
|
+
},
|
24
|
+
"versionRange": {
|
25
|
+
"type": "array",
|
26
|
+
"items": {
|
27
|
+
"type": "string",
|
28
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
29
|
+
},
|
30
|
+
"minItems": 1,
|
31
|
+
"maxItems": 2
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"required": ["date", "id", "versionRange"],
|
35
|
+
"additionalProperties": false
|
36
|
+
}
|
37
|
+
},
|
38
|
+
"cloud": {
|
39
|
+
"type": "array",
|
40
|
+
"items": {
|
41
|
+
"type": "object",
|
42
|
+
"properties": {
|
43
|
+
"image": {
|
44
|
+
"type": "string"
|
45
|
+
},
|
46
|
+
"date": {
|
47
|
+
"type": "string",
|
48
|
+
"pattern": "^\\d+-\\d+-\\d+$"
|
49
|
+
},
|
50
|
+
"id": {
|
51
|
+
"type": "string"
|
52
|
+
},
|
53
|
+
"versionRange": {
|
54
|
+
"type": "array",
|
55
|
+
"items": {
|
56
|
+
"type": "string",
|
57
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
58
|
+
},
|
59
|
+
"minItems": 1,
|
60
|
+
"maxItems": 2
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"required": ["date", "id", "versionRange"],
|
64
|
+
"additionalProperties": false
|
65
|
+
}
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"required": ["$schema", "community"],
|
69
|
+
"type": "object"
|
70
|
+
}
|
@@ -8,9 +8,10 @@ tags:
|
|
8
8
|
- Environment Variables
|
9
9
|
- Webhook Configuration
|
10
10
|
---
|
11
|
+
|
11
12
|
# Configure Clerk Authentication Service
|
12
13
|
|
13
|
-
Go to [Clerk](https://clerk.com?utm_source=lobehub
|
14
|
+
Go to [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) to register and create an application to obtain the corresponding Public Key and Secret Key.
|
14
15
|
|
15
16
|
## Get Environment Variables
|
16
17
|
|
@@ -21,11 +22,9 @@ Go to [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) to register
|
|
21
22
|
Add `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` environment variables. You can click on the "API Keys" in the menu and copy the corresponding values to get these environment variables.
|
22
23
|
|
23
24
|
<Image
|
24
|
-
alt={'Find the corresponding public and private key environment variables in Clerk'}
|
25
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'}
|
26
|
-
|
27
|
-
>
|
28
|
-
</Image>
|
25
|
+
alt={'Find the corresponding public and private key environment variables in Clerk'}
|
26
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'}
|
27
|
+
/>
|
29
28
|
|
30
29
|
The environment variables required for this step are as follows:
|
31
30
|
|
@@ -41,33 +40,31 @@ Since we let Clerk fully handle user authentication and management, we need Cler
|
|
41
40
|
We need to add an endpoint in Clerk's Webhooks to inform Clerk to send notifications to this endpoint when a user's information changes.
|
42
41
|
|
43
42
|
<Image
|
44
|
-
alt={'Add Webhooks endpoint in Clerk'}
|
45
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
|
46
|
-
|
47
|
-
>
|
48
|
-
</Image>
|
43
|
+
alt={'Add Webhooks endpoint in Clerk'}
|
44
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
|
45
|
+
/>
|
49
46
|
|
50
47
|
Fill in your project URL in the endpoint, such as `https://your-project.com/api/webhooks/clerk`. Then, subscribe to events by checking the three user events (`user.created`, `user.deleted`, `user.updated`), and click create.
|
51
48
|
|
52
|
-
<Callout type={'warning'}>
|
49
|
+
<Callout type={'warning'}>
|
53
50
|
|
54
|
-
|
55
|
-
alt={'Configure URL and user events when adding Clerk Webhooks'}
|
56
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'}>
|
51
|
+
The `https://` in the URL is essential to maintain the integrity of the URL.
|
57
52
|
|
58
|
-
>
|
59
|
-
|
53
|
+
</Callout>
|
54
|
+
|
55
|
+
<Image
|
56
|
+
alt={'Configure URL and user events when adding Clerk Webhooks'}
|
57
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'}
|
58
|
+
/>
|
60
59
|
|
61
60
|
### Add Webhook Secret to Environment Variables
|
62
61
|
|
63
62
|
After creating, you can find the secret of this Webhook in the bottom right corner:
|
64
63
|
|
65
64
|
<Image
|
66
|
-
alt={'View Clerk Webhooks secret'}
|
67
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'}
|
68
|
-
|
69
|
-
>
|
70
|
-
</Image>
|
65
|
+
alt={'View Clerk Webhooks secret'}
|
66
|
+
src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'}
|
67
|
+
/>
|
71
68
|
|
72
69
|
The environment variable corresponding to this secret is `CLERK_WEBHOOK_SECRET`:
|
73
70
|
|
@@ -78,4 +75,3 @@ CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
|
78
75
|
</Steps>
|
79
76
|
|
80
77
|
By following these steps, you have successfully configured the Clerk authentication service.
|
81
|
-
|
@@ -7,6 +7,7 @@ tags:
|
|
7
7
|
- Webhook
|
8
8
|
- 环境变量
|
9
9
|
---
|
10
|
+
|
10
11
|
# 配置 Clerk 身份验证服务
|
11
12
|
|
12
13
|
前往 [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。
|
@@ -22,7 +23,7 @@ tags:
|
|
22
23
|
<Image
|
23
24
|
alt={'在 Clerk 中找到对应的公私钥环境变量'}
|
24
25
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'}
|
25
|
-
|
26
|
+
/>
|
26
27
|
|
27
28
|
此步骤所需的环境变量如下:
|
28
29
|
|
@@ -40,7 +41,7 @@ CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
|
40
41
|
<Image
|
41
42
|
alt={'Clerk 添加 Webhooks 端点'}
|
42
43
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
|
43
|
-
|
44
|
+
/>
|
44
45
|
|
45
46
|
在 endppint 中填写你的项目 URL,如 `https://your-project.com/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。
|
46
47
|
|
@@ -49,7 +50,7 @@ CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
|
49
50
|
<Image
|
50
51
|
alt={'添加 Clerk Webhooks 时,配置 URL 和用户事件'}
|
51
52
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'}
|
52
|
-
|
53
|
+
/>
|
53
54
|
|
54
55
|
### 将 Webhook 秘钥添加到环境变量
|
55
56
|
|
@@ -58,7 +59,7 @@ CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
|
58
59
|
<Image
|
59
60
|
alt={'查看 Clerk Webhooks 秘钥'}
|
60
61
|
src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'}
|
61
|
-
|
62
|
+
/>
|
62
63
|
|
63
64
|
这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`:
|
64
65
|
|
@@ -19,8 +19,7 @@ tags:
|
|
19
19
|
<Steps>
|
20
20
|
### Create an Authelia Identity Provider
|
21
21
|
|
22
|
-
We assume you are already familiar with using Authelia. Let's say your LobeChat instance is deployed at https://lobe.example.com/.
|
23
|
-
Note that currently only localhost supports HTTP access; other domains need to enable TLS, otherwise Authelia will actively interrupt authentication by default.
|
22
|
+
We assume you are already familiar with using Authelia. Let's say your LobeChat instance is deployed at https://lobe.example.com/. Note that currently only localhost supports HTTP access; other domains need to enable TLS, otherwise Authelia will actively interrupt authentication by default.
|
24
23
|
|
25
24
|
Now, let's open and edit the configuration file of your Authelia instance:
|
26
25
|
|
@@ -46,8 +45,7 @@ identity_providers:
|
|
46
45
|
userinfo_signing_algorithm: none
|
47
46
|
```
|
48
47
|
|
49
|
-
Make sure to replace secret and redirect_urls with your own values.
|
50
|
-
Note! The secret configured in Authelia is ciphertext, i.e., a salted hash value. Its corresponding plaintext needs to be filled in LobeChat later.
|
48
|
+
Make sure to replace secret and redirect_urls with your own values. Note! The secret configured in Authelia is ciphertext, i.e., a salted hash value. Its corresponding plaintext needs to be filled in LobeChat later.
|
51
49
|
|
52
50
|
Save the configuration file and restart the Authelia service. Now we have completed the Authelia configuration.
|
53
51
|
|
@@ -16,8 +16,7 @@ tags:
|
|
16
16
|
<Steps>
|
17
17
|
### 创建 Authelia 提供应用
|
18
18
|
|
19
|
-
我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/`
|
20
|
-
注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。
|
19
|
+
我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/` 中。注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。
|
21
20
|
|
22
21
|
现在,我们打开 Authelia 实例的配置文件进行编辑:
|
23
22
|
|
@@ -44,8 +43,7 @@ identity_providers:
|
|
44
43
|
userinfo_signing_algorithm: none
|
45
44
|
```
|
46
45
|
|
47
|
-
请您确保 `secret` 和 `redirect_urls`
|
48
|
-
注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。
|
46
|
+
请您确保 `secret` 和 `redirect_urls` 替换成您自己的值。注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。
|
49
47
|
|
50
48
|
保存配置文件,然后重启 Authelia 服务。现在我们完成了 Authelia 的配置工作。
|
51
49
|
|
@@ -59,7 +57,7 @@ identity_providers:
|
|
59
57
|
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authelia 请填写 `authelia`。 |
|
60
58
|
| `AUTH_AUTHELIA_ID` | 必选 | 刚刚在 Authelia 配置的 `id`,示例值是 `lobe-chat` |
|
61
59
|
| `AUTH_AUTHELIA_SECRET` | 必选 | 刚刚在 Authelia 配置的 `secret` 对应的明文,示例值是 `insecure_secret` |
|
62
|
-
| `AUTH_AUTHELIA_ISSUER` | 必选
|
60
|
+
| `AUTH_AUTHELIA_ISSUER` | 必选 | 您的 Authelia 的网址,例如 `https://sso.example.com` |
|
63
61
|
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
64
62
|
|
65
63
|
<Callout type={'tip'}>
|
@@ -27,8 +27,8 @@ https://your-domain/api/auth/callback/authentik
|
|
27
27
|
```
|
28
28
|
|
29
29
|
<Callout type={'info'}>
|
30
|
-
- 可以之后再填写或修改 `重定向 URL/Origin(正则)`,但是务必保证填写的 URL 与部署的 URL 一致。
|
31
|
-
|
30
|
+
- 可以之后再填写或修改 `重定向 URL/Origin(正则)`,但是务必保证填写的 URL 与部署的 URL 一致。 -
|
31
|
+
your-domain 请替换为自己的域名
|
32
32
|
</Callout>
|
33
33
|
|
34
34
|
<Image
|
@@ -16,7 +16,8 @@ tags:
|
|
16
16
|
[Casdoor](https://github.com/casdoor/casdoor) is an open-source authentication service that is rich in features and easy to use.
|
17
17
|
|
18
18
|
<Callout type={'tip'}>
|
19
|
-
If you want to privately deploy Casdoor, we recommend using Docker Compose to deploy it together
|
19
|
+
If you want to privately deploy Casdoor, we recommend using Docker Compose to deploy it together
|
20
|
+
with the LobeChat database version, allowing LobeChat to share the same Postgres instance.
|
20
21
|
</Callout>
|
21
22
|
|
22
23
|
## Casdoor Configuration Process
|
@@ -32,7 +33,8 @@ If you are deploying using a public network, the following assumptions apply:
|
|
32
33
|
- You privately deploy Casdoor, and its domain is `https://lobe-auth-api.example.com`.
|
33
34
|
|
34
35
|
<Steps>
|
35
|
-
|
36
|
+
|
37
|
+
### Create a Casdoor Application
|
36
38
|
|
37
39
|
Access your privately deployed Casdoor WebUI (default is `http://localhost:8000/`) to enter the console. The default account is `admin`, and the password is `123`.
|
38
40
|
|
@@ -49,46 +51,46 @@ There are also some optional fields that can enhance user experience:
|
|
49
51
|
- Logo: `https://lobehub.com/icon-192x192.png`
|
50
52
|
- Form CSS, Form CSS (Mobile):
|
51
53
|
|
52
|
-
|
53
|
-
|
54
|
+
```html
|
55
|
+
<style>
|
56
|
+
.login-panel {
|
57
|
+
padding: 40px 70px 0 70px;
|
58
|
+
border-radius: 10px;
|
59
|
+
background-color: #ffffff;
|
60
|
+
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
61
|
+
}
|
62
|
+
.panel-logo {
|
63
|
+
width: 64px;
|
64
|
+
}
|
65
|
+
.login-logo-box {
|
66
|
+
margin-top: 20px;
|
67
|
+
}
|
68
|
+
|
69
|
+
#parent-area
|
70
|
+
> main
|
71
|
+
> div
|
72
|
+
> div.login-content
|
73
|
+
> div.login-panel
|
74
|
+
> div.login-form
|
75
|
+
> div
|
76
|
+
> div
|
77
|
+
> button {
|
78
|
+
box-shadow: none !important;
|
79
|
+
border-radius: 10px !important;
|
80
|
+
transition-property: all;
|
81
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
82
|
+
transition-duration: 150ms;
|
83
|
+
border: 1px solid #eee !important;
|
84
|
+
}
|
85
|
+
|
86
|
+
@media (max-width: 640px) {
|
54
87
|
.login-panel {
|
55
|
-
padding: 40px
|
56
|
-
|
57
|
-
background-color: #ffffff;
|
58
|
-
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
59
|
-
}
|
60
|
-
.panel-logo {
|
61
|
-
width: 64px;
|
62
|
-
}
|
63
|
-
.login-logo-box {
|
64
|
-
margin-top: 20px;
|
65
|
-
}
|
66
|
-
|
67
|
-
#parent-area
|
68
|
-
> main
|
69
|
-
> div
|
70
|
-
> div.login-content
|
71
|
-
> div.login-panel
|
72
|
-
> div.login-form
|
73
|
-
> div
|
74
|
-
> div
|
75
|
-
> button {
|
76
|
-
box-shadow: none !important;
|
77
|
-
border-radius: 10px !important;
|
78
|
-
transition-property: all;
|
79
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
80
|
-
transition-duration: 150ms;
|
81
|
-
border: 1px solid #eee !important;
|
88
|
+
padding: 40px 0 0 0;
|
89
|
+
box-shadow: none;
|
82
90
|
}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
padding: 40px 0 0 0;
|
87
|
-
box-shadow: none;
|
88
|
-
}
|
89
|
-
}
|
90
|
-
</style>
|
91
|
-
```
|
91
|
+
}
|
92
|
+
</style>
|
93
|
+
```
|
92
94
|
|
93
95
|
Then, copy the `Client ID` and `Client Secret` and save them.
|
94
96
|
|
@@ -113,10 +115,13 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
113
115
|
| `AUTH_CASDOOR_ISSUER` | Required | The OpenID Connect issuer for the Casdoor provider. |
|
114
116
|
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification and needs to be set only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
|
115
117
|
|
116
|
-
|
117
|
-
|
118
|
-
|
118
|
+
<Callout type={'tip'}>
|
119
|
+
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#casdoor) for
|
120
|
+
details on related variables.
|
119
121
|
</Callout>
|
122
|
+
|
120
123
|
</Steps>
|
121
124
|
|
122
|
-
<Callout type={'info'}>
|
125
|
+
<Callout type={'info'}>
|
126
|
+
Once deployed successfully, users will be able to authenticate via Casdoor and use LobeChat.
|
127
|
+
</Callout>
|
@@ -30,7 +30,8 @@ tags:
|
|
30
30
|
- 你私有部署 Casdoor,其域名为 `https://lobe-auth-api.example.com`。
|
31
31
|
|
32
32
|
<Steps>
|
33
|
-
|
33
|
+
|
34
|
+
### 创建 Casdoor 应用
|
34
35
|
|
35
36
|
访问你私有部署的 Casdoor WebUI(默认为 `http://localhost:8000/`) 进入控制台,默认账号为 `admin`,密码为 `123`。
|
36
37
|
|
@@ -47,46 +48,46 @@ tags:
|
|
47
48
|
- Logo:`https://lobehub.com/icon-192x192.png`
|
48
49
|
- 表单 CSS、表单 CSS(移动端):
|
49
50
|
|
50
|
-
|
51
|
-
|
51
|
+
```html
|
52
|
+
<style>
|
53
|
+
.login-panel {
|
54
|
+
padding: 40px 70px 0 70px;
|
55
|
+
border-radius: 10px;
|
56
|
+
background-color: #ffffff;
|
57
|
+
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
58
|
+
}
|
59
|
+
.panel-logo {
|
60
|
+
width: 64px;
|
61
|
+
}
|
62
|
+
.login-logo-box {
|
63
|
+
margin-top: 20px;
|
64
|
+
}
|
65
|
+
|
66
|
+
#parent-area
|
67
|
+
> main
|
68
|
+
> div
|
69
|
+
> div.login-content
|
70
|
+
> div.login-panel
|
71
|
+
> div.login-form
|
72
|
+
> div
|
73
|
+
> div
|
74
|
+
> button {
|
75
|
+
box-shadow: none !important;
|
76
|
+
border-radius: 10px !important;
|
77
|
+
transition-property: all;
|
78
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
79
|
+
transition-duration: 150ms;
|
80
|
+
border: 1px solid #eee !important;
|
81
|
+
}
|
82
|
+
|
83
|
+
@media (max-width: 640px) {
|
52
84
|
.login-panel {
|
53
|
-
padding: 40px
|
54
|
-
|
55
|
-
background-color: #ffffff;
|
56
|
-
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
57
|
-
}
|
58
|
-
.panel-logo {
|
59
|
-
width: 64px;
|
60
|
-
}
|
61
|
-
.login-logo-box {
|
62
|
-
margin-top: 20px;
|
63
|
-
}
|
64
|
-
|
65
|
-
#parent-area
|
66
|
-
> main
|
67
|
-
> div
|
68
|
-
> div.login-content
|
69
|
-
> div.login-panel
|
70
|
-
> div.login-form
|
71
|
-
> div
|
72
|
-
> div
|
73
|
-
> button {
|
74
|
-
box-shadow: none !important;
|
75
|
-
border-radius: 10px !important;
|
76
|
-
transition-property: all;
|
77
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
78
|
-
transition-duration: 150ms;
|
79
|
-
border: 1px solid #eee !important;
|
80
|
-
}
|
81
|
-
|
82
|
-
@media (max-width: 640px) {
|
83
|
-
.login-panel {
|
84
|
-
padding: 40px 0 0 0;
|
85
|
-
box-shadow: none;
|
86
|
-
}
|
85
|
+
padding: 40px 0 0 0;
|
86
|
+
box-shadow: none;
|
87
87
|
}
|
88
|
-
|
89
|
-
|
88
|
+
}
|
89
|
+
</style>
|
90
|
+
```
|
90
91
|
|
91
92
|
随后,复制 `客户端 ID` 和 `客户端密钥`,并保存。
|
92
93
|
|
@@ -113,8 +114,8 @@ tags:
|
|
113
114
|
|
114
115
|
<Callout type={'tip'}>
|
115
116
|
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#casdoor) 可查阅相关变量详情。
|
116
|
-
|
117
|
+
|
117
118
|
</Callout>
|
118
119
|
</Steps>
|
119
120
|
|
120
|
-
<Callout type={'info'}>部署成功后,用户将可以通过 Casdoor 身份认证并使用 LobeChat。</Callout>
|
121
|
+
<Callout type={'info'}>部署成功后,用户将可以通过 Casdoor 身份认证并使用 LobeChat。</Callout>
|
@@ -31,39 +31,47 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log
|
|
31
31
|
<Steps>
|
32
32
|
### Create Logto Application
|
33
33
|
|
34
|
-
|
34
|
+
Access your privately deployed Logto WebUI or [Logto Cloud](http://cloud.logto.io/) to enter the console, and create a `Next.js (App Router)` application under `Applications` with any name.
|
35
35
|
|
36
|
-
|
36
|
+
### Configure Logto
|
37
37
|
|
38
|
-
|
38
|
+
Set the `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto` and the `Post sign-out redirect URI` to `https://lobe.example.com/`.
|
39
39
|
|
40
|
-
|
40
|
+
Set `CORS allowed origins` to `https://lobe.example.com`.
|
41
41
|
|
42
|
-
|
42
|
+
<Image
|
43
|
+
alt="Configure Logto"
|
44
|
+
inStep
|
45
|
+
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
46
|
+
/>
|
43
47
|
|
44
|
-
|
48
|
+
After successful creation, save the `Client ID` and `Client Secret`.
|
45
49
|
|
46
|
-
|
50
|
+
### Configure Environment Variables
|
47
51
|
|
48
|
-
|
52
|
+
<Image
|
53
|
+
alt="Configure Environment Variables"
|
54
|
+
inStep
|
55
|
+
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
56
|
+
/>
|
49
57
|
|
50
|
-
|
58
|
+
Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
|
51
59
|
|
52
|
-
|
60
|
+
Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
|
53
61
|
|
54
|
-
|
55
|
-
|
62
|
+
- `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
|
63
|
+
- `https://example.logto.app/oidc` if you are using Logto Cloud
|
56
64
|
|
57
|
-
|
65
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
58
66
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
+
| Environment Variable | Type | Description |
|
68
|
+
| --- | --- | --- |
|
69
|
+
| `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can generate a key using the command: `openssl rand -base64 32` |
|
70
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
|
71
|
+
| `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page |
|
72
|
+
| `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page |
|
73
|
+
| `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider |
|
74
|
+
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
|
67
75
|
|
68
76
|
<Callout type={'tip'}>
|
69
77
|
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#logto) for details on related variables.
|
@@ -13,7 +13,8 @@ tags:
|
|
13
13
|
[Logto](https://github.com/logto-io/logto) 是一个开源的身份验证服务,界面简洁美观、功能配置丰富且易于上手,你即可以选择使用其官方提供的 Logto Cloud,也可以选择私有部署 Logto。
|
14
14
|
|
15
15
|
<Callout type={'tip'}>
|
16
|
-
|
16
|
+
若你想要私有部署 Logto,我们建议你将之与 LobeChat 数据库版本一同使用 Docker Compose 部署,此时
|
17
|
+
LobeChat 可以与之共用同一个 Postgres 实例。
|
17
18
|
</Callout>
|
18
19
|
|
19
20
|
## Logto 配置流程
|
@@ -60,17 +60,17 @@ To simultaneously enable multiple identity verification sources, please set the
|
|
60
60
|
|
61
61
|
The order corresponds to the display order of the SSO providers.
|
62
62
|
|
63
|
-
| SSO Provider
|
64
|
-
|
|
65
|
-
| Auth0
|
66
|
-
| Authenlia
|
67
|
-
| Authentik
|
68
|
-
| Casdoor
|
63
|
+
| SSO Provider | Value |
|
64
|
+
| --------------------- | ----------------------- |
|
65
|
+
| Auth0 | `auth0` |
|
66
|
+
| Authenlia | `authenlia` |
|
67
|
+
| Authentik | `authentik` |
|
68
|
+
| Casdoor | `casdoor` |
|
69
69
|
| Cloudflare Zero Trust | `cloudflare-zero-trust` |
|
70
|
-
| Github
|
71
|
-
| Logto
|
72
|
-
| Microsoft Entra ID
|
73
|
-
| ZITADEL
|
70
|
+
| Github | `github` |
|
71
|
+
| Logto | `logto` |
|
72
|
+
| Microsoft Entra ID | `microsoft-entra-id` |
|
73
|
+
| ZITADEL | `zitadel` |
|
74
74
|
|
75
75
|
## Other SSO Providers
|
76
76
|
|