@lobehub/chat 1.33.4 → 1.34.0

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.
Files changed (295) hide show
  1. package/.i18nrc.js +8 -2
  2. package/.releaserc.js +10 -1
  3. package/CHANGELOG.md +51 -16624
  4. package/changelog/CHANGELOG.v0.md +16621 -0
  5. package/changelog/v0.json +6064 -0
  6. package/changelog/v1.json +3356 -0
  7. package/docs/changelog/2024-11-25-november-providers.mdx +19 -0
  8. package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +17 -0
  9. package/docs/changelog/index.json +12 -0
  10. package/docs/changelog/schema.json +70 -0
  11. package/docs/self-hosting/advanced/auth/clerk.mdx +19 -23
  12. package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +5 -4
  13. package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +2 -4
  14. package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +3 -5
  15. package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +2 -2
  16. package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +49 -44
  17. package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +42 -41
  18. package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +29 -21
  19. package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +2 -1
  20. package/docs/self-hosting/advanced/auth.mdx +10 -10
  21. package/docs/self-hosting/advanced/auth.zh-CN.mdx +10 -10
  22. package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
  23. package/docs/self-hosting/advanced/model-list.mdx +1 -1
  24. package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +17 -12
  25. package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +33 -20
  26. package/docs/self-hosting/advanced/s3.mdx +31 -28
  27. package/docs/self-hosting/advanced/s3.zh-CN.mdx +1 -0
  28. package/docs/self-hosting/advanced/webrtc.mdx +1 -0
  29. package/docs/self-hosting/environment-variables/s3.mdx +4 -3
  30. package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +1 -0
  31. package/docs/self-hosting/environment-variables.mdx +6 -9
  32. package/docs/self-hosting/platform/alibaba-cloud.mdx +1 -2
  33. package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +1 -2
  34. package/docs/self-hosting/platform/btpanel.mdx +7 -13
  35. package/docs/self-hosting/platform/btpanel.zh-CN.mdx +8 -13
  36. package/docs/self-hosting/platform/docker.zh-CN.mdx +2 -1
  37. package/docs/self-hosting/platform/netlify.zh-CN.mdx +2 -1
  38. package/docs/self-hosting/server-database/docker.mdx +18 -5
  39. package/docs/self-hosting/server-database/docker.zh-CN.mdx +9 -6
  40. package/docs/self-hosting/server-database/netlify.mdx +0 -1
  41. package/docs/self-hosting/server-database/railway.mdx +0 -1
  42. package/docs/self-hosting/server-database/repocloud.mdx +5 -2
  43. package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +23 -3
  44. package/docs/self-hosting/server-database/sealos.mdx +3 -0
  45. package/docs/self-hosting/server-database/vercel.mdx +35 -32
  46. package/docs/self-hosting/server-database/vercel.zh-CN.mdx +25 -25
  47. package/docs/self-hosting/server-database/zeabur.mdx +2 -2
  48. package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +3 -4
  49. package/docs/self-hosting/server-database.mdx +23 -8
  50. package/docs/self-hosting/start.mdx +8 -2
  51. package/docs/usage/features/database.zh-CN.mdx +1 -1
  52. package/docs/usage/foundation/text2image.mdx +1 -2
  53. package/docs/usage/foundation/text2image.zh-CN.mdx +1 -3
  54. package/docs/usage/providers/ai21.mdx +14 -15
  55. package/docs/usage/providers/ai21.zh-CN.mdx +1 -3
  56. package/docs/usage/providers/ai360.mdx +14 -15
  57. package/docs/usage/providers/ai360.zh-CN.mdx +1 -3
  58. package/docs/usage/providers/cloudflare.mdx +1 -1
  59. package/docs/usage/providers/fireworksai.mdx +19 -19
  60. package/docs/usage/providers/fireworksai.zh-CN.mdx +1 -3
  61. package/docs/usage/providers/github.mdx +22 -21
  62. package/docs/usage/providers/github.zh-CN.mdx +6 -6
  63. package/docs/usage/providers/hunyuan.mdx +17 -18
  64. package/docs/usage/providers/hunyuan.zh-CN.mdx +1 -3
  65. package/docs/usage/providers/siliconcloud.mdx +14 -15
  66. package/docs/usage/providers/siliconcloud.zh-CN.mdx +3 -5
  67. package/docs/usage/providers/spark.mdx +17 -18
  68. package/docs/usage/providers/spark.zh-CN.mdx +1 -3
  69. package/docs/usage/providers/upstage.mdx +14 -15
  70. package/docs/usage/providers/upstage.zh-CN.mdx +1 -3
  71. package/docs/usage/providers/wenxin.mdx +17 -18
  72. package/docs/usage/providers/wenxin.zh-CN.mdx +1 -3
  73. package/docs/usage/providers/zeroone.mdx +2 -2
  74. package/locales/ar/chat.json +7 -0
  75. package/locales/ar/common.json +2 -0
  76. package/locales/ar/models.json +24 -0
  77. package/locales/ar/providers.json +3 -0
  78. package/locales/ar/setting.json +5 -0
  79. package/locales/ar/thread.json +5 -0
  80. package/locales/bg-BG/chat.json +7 -0
  81. package/locales/bg-BG/common.json +2 -0
  82. package/locales/bg-BG/models.json +24 -0
  83. package/locales/bg-BG/providers.json +3 -0
  84. package/locales/bg-BG/setting.json +5 -0
  85. package/locales/bg-BG/thread.json +5 -0
  86. package/locales/de-DE/chat.json +7 -0
  87. package/locales/de-DE/common.json +2 -0
  88. package/locales/de-DE/models.json +24 -0
  89. package/locales/de-DE/providers.json +3 -0
  90. package/locales/de-DE/setting.json +5 -0
  91. package/locales/de-DE/thread.json +5 -0
  92. package/locales/en-US/chat.json +7 -0
  93. package/locales/en-US/common.json +2 -0
  94. package/locales/en-US/models.json +24 -0
  95. package/locales/en-US/providers.json +3 -0
  96. package/locales/en-US/setting.json +5 -0
  97. package/locales/en-US/thread.json +5 -0
  98. package/locales/es-ES/chat.json +7 -0
  99. package/locales/es-ES/common.json +2 -0
  100. package/locales/es-ES/models.json +24 -0
  101. package/locales/es-ES/providers.json +3 -0
  102. package/locales/es-ES/setting.json +5 -0
  103. package/locales/es-ES/thread.json +5 -0
  104. package/locales/fa-IR/chat.json +7 -0
  105. package/locales/fa-IR/common.json +2 -0
  106. package/locales/fa-IR/models.json +24 -0
  107. package/locales/fa-IR/providers.json +3 -0
  108. package/locales/fa-IR/setting.json +5 -0
  109. package/locales/fa-IR/thread.json +5 -0
  110. package/locales/fr-FR/chat.json +7 -0
  111. package/locales/fr-FR/common.json +2 -0
  112. package/locales/fr-FR/models.json +24 -0
  113. package/locales/fr-FR/providers.json +3 -0
  114. package/locales/fr-FR/setting.json +5 -0
  115. package/locales/fr-FR/thread.json +5 -0
  116. package/locales/it-IT/chat.json +7 -0
  117. package/locales/it-IT/common.json +2 -0
  118. package/locales/it-IT/models.json +24 -0
  119. package/locales/it-IT/providers.json +3 -0
  120. package/locales/it-IT/setting.json +5 -0
  121. package/locales/it-IT/thread.json +5 -0
  122. package/locales/ja-JP/chat.json +7 -0
  123. package/locales/ja-JP/common.json +2 -0
  124. package/locales/ja-JP/models.json +24 -0
  125. package/locales/ja-JP/providers.json +3 -0
  126. package/locales/ja-JP/setting.json +5 -0
  127. package/locales/ja-JP/thread.json +5 -0
  128. package/locales/ko-KR/chat.json +7 -0
  129. package/locales/ko-KR/common.json +2 -0
  130. package/locales/ko-KR/models.json +24 -0
  131. package/locales/ko-KR/providers.json +3 -0
  132. package/locales/ko-KR/setting.json +5 -0
  133. package/locales/ko-KR/thread.json +5 -0
  134. package/locales/nl-NL/chat.json +7 -0
  135. package/locales/nl-NL/common.json +2 -0
  136. package/locales/nl-NL/models.json +24 -0
  137. package/locales/nl-NL/providers.json +3 -0
  138. package/locales/nl-NL/setting.json +5 -0
  139. package/locales/nl-NL/thread.json +5 -0
  140. package/locales/pl-PL/chat.json +7 -0
  141. package/locales/pl-PL/common.json +2 -0
  142. package/locales/pl-PL/models.json +24 -0
  143. package/locales/pl-PL/providers.json +3 -0
  144. package/locales/pl-PL/setting.json +5 -0
  145. package/locales/pl-PL/thread.json +5 -0
  146. package/locales/pt-BR/chat.json +7 -0
  147. package/locales/pt-BR/common.json +2 -0
  148. package/locales/pt-BR/models.json +24 -0
  149. package/locales/pt-BR/providers.json +3 -0
  150. package/locales/pt-BR/setting.json +5 -0
  151. package/locales/pt-BR/thread.json +5 -0
  152. package/locales/ru-RU/chat.json +7 -0
  153. package/locales/ru-RU/common.json +2 -0
  154. package/locales/ru-RU/models.json +24 -0
  155. package/locales/ru-RU/providers.json +3 -0
  156. package/locales/ru-RU/setting.json +5 -0
  157. package/locales/ru-RU/thread.json +5 -0
  158. package/locales/tr-TR/chat.json +7 -0
  159. package/locales/tr-TR/common.json +2 -0
  160. package/locales/tr-TR/models.json +24 -0
  161. package/locales/tr-TR/providers.json +3 -0
  162. package/locales/tr-TR/setting.json +5 -0
  163. package/locales/tr-TR/thread.json +5 -0
  164. package/locales/vi-VN/chat.json +7 -0
  165. package/locales/vi-VN/common.json +2 -0
  166. package/locales/vi-VN/models.json +24 -0
  167. package/locales/vi-VN/providers.json +3 -0
  168. package/locales/vi-VN/setting.json +5 -0
  169. package/locales/vi-VN/thread.json +5 -0
  170. package/locales/zh-CN/chat.json +7 -0
  171. package/locales/zh-CN/common.json +2 -0
  172. package/locales/zh-CN/models.json +24 -0
  173. package/locales/zh-CN/providers.json +3 -0
  174. package/locales/zh-CN/setting.json +5 -0
  175. package/locales/zh-CN/thread.json +5 -0
  176. package/locales/zh-TW/chat.json +7 -0
  177. package/locales/zh-TW/common.json +2 -0
  178. package/locales/zh-TW/models.json +24 -0
  179. package/locales/zh-TW/providers.json +3 -0
  180. package/locales/zh-TW/setting.json +5 -0
  181. package/locales/zh-TW/thread.json +5 -0
  182. package/package.json +6 -1
  183. package/scripts/changelogWorkflow/buildStaticChangelog.ts +135 -0
  184. package/scripts/changelogWorkflow/const.ts +11 -0
  185. package/scripts/changelogWorkflow/index.ts +10 -0
  186. package/src/app/(main)/chat/(workspace)/@conversation/default.tsx +2 -0
  187. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatHydration/index.tsx +11 -2
  188. package/src/{features → app/(main)/chat/(workspace)/@conversation/features}/ChatInput/Desktop/Footer/index.tsx +7 -9
  189. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/index.tsx +7 -2
  190. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +62 -0
  191. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/ThreadItem.tsx +68 -0
  192. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/index.tsx +62 -2
  193. package/src/app/(main)/chat/(workspace)/@conversation/features/ThreadHydration.tsx +47 -0
  194. package/src/app/(main)/chat/(workspace)/@portal/_layout/Desktop.tsx +3 -2
  195. package/src/app/(main)/chat/(workspace)/@portal/_layout/Mobile.tsx +47 -6
  196. package/src/app/(main)/chat/(workspace)/@topic/features/SkeletonList.tsx +3 -2
  197. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/index.tsx +10 -3
  198. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/FlatMode/index.tsx +1 -1
  199. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/Content.tsx +164 -0
  200. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/index.tsx +98 -0
  201. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/{TopicItem.tsx → TopicItem/index.tsx} +33 -22
  202. package/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx +12 -5
  203. package/src/app/(main)/chat/(workspace)/_layout/Mobile/index.tsx +1 -2
  204. package/src/const/message.ts +2 -0
  205. package/src/const/settings/systemAgent.ts +1 -0
  206. package/src/database/server/migrations/0012_add_thread.sql +39 -0
  207. package/src/database/server/migrations/meta/0012_snapshot.json +3671 -0
  208. package/src/database/server/migrations/meta/_journal.json +7 -0
  209. package/src/database/server/models/_template.ts +2 -2
  210. package/src/database/server/models/message.ts +1 -0
  211. package/src/database/server/models/thread.ts +79 -0
  212. package/src/database/server/schemas/lobechat/message.ts +2 -1
  213. package/src/database/server/schemas/lobechat/relations.ts +13 -1
  214. package/src/database/server/schemas/lobechat/topic.ts +30 -1
  215. package/src/database/server/utils/idGenerator.ts +1 -0
  216. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +6 -4
  217. package/src/features/ChatInput/ActionBar/Token/index.tsx +24 -5
  218. package/src/features/ChatInput/ActionBar/config.ts +3 -2
  219. package/src/features/ChatInput/Desktop/index.tsx +15 -7
  220. package/src/features/ChatInput/Mobile/index.tsx +4 -4
  221. package/src/features/Conversation/Actions/Assistant.tsx +24 -5
  222. package/src/features/Conversation/Actions/User.tsx +21 -4
  223. package/src/features/Conversation/Actions/index.ts +1 -66
  224. package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/index.tsx +3 -1
  225. package/src/features/Conversation/Messages/{Tool/index.tsx → Assistant/ToolCallItem/Tool.tsx} +10 -11
  226. package/src/features/Conversation/Messages/Assistant/ToolCallItem/index.tsx +5 -3
  227. package/src/features/Conversation/Messages/Assistant/index.tsx +22 -14
  228. package/src/features/Conversation/Messages/index.ts +0 -2
  229. package/src/features/Conversation/components/AutoScroll.tsx +1 -1
  230. package/src/features/Conversation/components/ChatItem/ActionsBar.tsx +79 -5
  231. package/src/features/Conversation/components/ChatItem/InPortalThreadContext.ts +3 -0
  232. package/src/features/Conversation/components/ChatItem/index.tsx +16 -5
  233. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/index.tsx +9 -1
  234. package/src/features/Conversation/components/ThreadDivider/index.tsx +19 -0
  235. package/src/features/Conversation/hooks/useChatListActionsBar.tsx +19 -4
  236. package/src/features/Portal/Thread/Chat/ChatInput/Footer.tsx +90 -0
  237. package/src/features/Portal/Thread/Chat/ChatInput/TextArea.tsx +30 -0
  238. package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +66 -0
  239. package/src/features/Portal/Thread/Chat/ChatInput/useSend.ts +50 -0
  240. package/src/features/Portal/Thread/Chat/ChatItem.tsx +62 -0
  241. package/src/features/Portal/Thread/Chat/ChatList.tsx +49 -0
  242. package/src/features/Portal/Thread/Chat/ThreadDivider/index.tsx +19 -0
  243. package/src/features/Portal/Thread/Chat/index.tsx +28 -0
  244. package/src/features/Portal/Thread/Header/Active.tsx +35 -0
  245. package/src/features/Portal/Thread/Header/New.tsx +37 -0
  246. package/src/features/Portal/Thread/Header/Title.tsx +18 -0
  247. package/src/features/Portal/Thread/Header/index.tsx +20 -0
  248. package/src/features/Portal/Thread/hook.ts +8 -0
  249. package/src/features/Portal/Thread/index.ts +12 -0
  250. package/src/features/Portal/router.tsx +2 -1
  251. package/src/hooks/useFetchTopics.ts +7 -1
  252. package/src/locales/default/chat.ts +8 -1
  253. package/src/locales/default/common.ts +3 -0
  254. package/src/locales/default/index.ts +2 -0
  255. package/src/locales/default/setting.ts +5 -0
  256. package/src/locales/default/thread.ts +5 -0
  257. package/src/server/routers/lambda/index.ts +2 -0
  258. package/src/server/routers/lambda/thread.ts +83 -0
  259. package/src/services/thread.ts +54 -0
  260. package/src/store/chat/initialState.ts +3 -0
  261. package/src/store/chat/selectors.ts +2 -1
  262. package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChat.test.ts +1 -1
  263. package/src/store/chat/slices/aiChat/actions/__tests__/rag.test.ts +1 -1
  264. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +31 -8
  265. package/src/store/chat/slices/aiChat/actions/rag.ts +1 -1
  266. package/src/store/chat/slices/message/selectors.test.ts +3 -3
  267. package/src/store/chat/slices/message/selectors.ts +50 -29
  268. package/src/store/chat/slices/plugin/action.ts +26 -8
  269. package/src/store/chat/slices/portal/action.ts +1 -0
  270. package/src/store/chat/slices/portal/initialState.ts +1 -0
  271. package/src/store/chat/slices/portal/selectors/thread.ts +17 -0
  272. package/src/store/chat/slices/portal/selectors.ts +2 -0
  273. package/src/store/chat/slices/thread/action.ts +326 -0
  274. package/src/store/chat/slices/thread/initialState.ts +34 -0
  275. package/src/store/chat/slices/thread/reducer.ts +48 -0
  276. package/src/store/chat/slices/thread/selectors/index.ts +202 -0
  277. package/src/store/chat/slices/thread/selectors/util.ts +22 -0
  278. package/src/store/chat/slices/topic/action.ts +5 -1
  279. package/src/store/chat/store.ts +5 -2
  280. package/src/store/global/initialState.ts +4 -0
  281. package/src/store/global/selectors.ts +4 -0
  282. package/src/store/user/slices/settings/selectors/systemAgent.ts +2 -0
  283. package/src/types/message/index.ts +17 -1
  284. package/src/types/topic/index.ts +1 -0
  285. package/src/types/topic/thread.ts +42 -0
  286. package/src/types/user/settings/systemAgent.ts +1 -0
  287. package/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx +0 -11
  288. package/src/app/(main)/chat/(workspace)/_layout/Mobile/PortalModal.tsx +0 -35
  289. /package/src/{features → app/(main)/chat/(workspace)/@conversation/features}/ChatInput/Desktop/Footer/SendMore.tsx +0 -0
  290. /package/src/{features → app/(main)/chat/(workspace)/@conversation/features}/ChatInput/Desktop/Footer/ShortcutHint.tsx +0 -0
  291. /package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/{DefaultContent.tsx → TopicItem/DefaultContent.tsx} +0 -0
  292. /package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/{TopicContent.tsx → TopicItem/TopicContent.tsx} +0 -0
  293. /package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/PluginResultJSON.tsx +0 -0
  294. /package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/Settings.tsx +0 -0
  295. /package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/style.ts +0 -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\&utm_medium=docs) to register and create an application to obtain the corresponding Public Key and Secret Key.
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'}>The `https://` in the URL is essential to maintain the integrity of the URL.</Callout>
49
+ <Callout type={'warning'}>
53
50
 
54
- <Image
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
- </Image>
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
- ></Image>
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
- ></Image>
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
- ></Image>
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
- ></Image>
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` | 必选 |您的 Authelia 的网址,例如 `https://sso.example.com` |
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
- - your-domain 请替换为自己的域名
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 with the LobeChat database version, allowing LobeChat to share the same Postgres instance.
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
- ### Create a Casdoor Application
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
- ```html
53
- <style>
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 70px 0 70px;
56
- border-radius: 10px;
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
- @media (max-width: 640px) {
85
- .login-panel {
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
- <Callout type={'tip'}>
117
- Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#casdoor) for details on related variables.
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'}>Once deployed successfully, users will be able to authenticate via Casdoor and use LobeChat.</Callout>
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
- ### 创建 Casdoor 应用
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
- ```html
51
- <style>
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 70px 0 70px;
54
- border-radius: 10px;
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
- </style>
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
- 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.
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
- ### Configure Logto
36
+ ### Configure Logto
37
37
 
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/`.
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
- Set `CORS allowed origins` to `https://lobe.example.com`.
40
+ Set `CORS allowed origins` to `https://lobe.example.com`.
41
41
 
42
- <Image alt="Configure Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
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
- After successful creation, save the `Client ID` and `Client Secret`.
48
+ After successful creation, save the `Client ID` and `Client Secret`.
45
49
 
46
- ### Configure Environment Variables
50
+ ### Configure Environment Variables
47
51
 
48
- <Image alt="Configure Environment Variables" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
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
- Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
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
- Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
60
+ Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
53
61
 
54
- - `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
55
- - `https://example.logto.app/oidc` if you are using Logto Cloud
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
- When deploying LobeChat, you need to configure the following environment variables:
65
+ When deploying LobeChat, you need to configure the following environment variables:
58
66
 
59
- | Environment Variable | Type | Description |
60
- | ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61
- | `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` |
62
- | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
63
- | `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page |
64
- | `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page |
65
- | `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider |
66
- | `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
+ | 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
- 若你想要私有部署 Logto,我们建议你将之与 LobeChat 数据库版本一同使用 Docker Compose 部署,此时 LobeChat 可以与之共用同一个 Postgres 实例。
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 | Value |
64
- | ------------------ | ----------- |
65
- | Auth0 | `auth0` |
66
- | Authenlia | `authenlia` |
67
- | Authentik | `authentik` |
68
- | Casdoor | `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 | `github` |
71
- | Logto | `logto` |
72
- | Microsoft Entra ID | `microsoft-entra-id` |
73
- | ZITADEL | `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