@lobehub/chat 1.44.2 → 1.45.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.
- package/.remarkrc.mdx.js +6 -0
- package/CHANGELOG.md +50 -0
- package/changelog/v1.json +18 -0
- package/docs/changelog/2023-09-09-plugin-system.mdx +5 -0
- package/docs/changelog/2023-09-09-plugin-system.zh-CN.mdx +5 -0
- package/docs/changelog/2023-11-14-gpt4-vision.mdx +6 -0
- package/docs/changelog/2023-11-14-gpt4-vision.zh-CN.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.mdx +6 -0
- package/docs/changelog/2023-11-19-tts-stt.zh-CN.mdx +7 -0
- package/docs/changelog/2023-12-22-dalle-3.mdx +6 -0
- package/docs/changelog/2023-12-22-dalle-3.zh-CN.mdx +4 -0
- package/docs/changelog/2024-02-08-sso-oauth.mdx +6 -0
- package/docs/changelog/2024-02-08-sso-oauth.zh-CN.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.mdx +6 -0
- package/docs/changelog/2024-02-14-ollama.zh-CN.mdx +5 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.mdx +6 -0
- package/docs/changelog/2024-06-19-lobe-chat-v1.zh-CN.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.mdx +5 -0
- package/docs/changelog/2024-07-19-gpt-4o-mini.zh-CN.mdx +4 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.mdx +6 -0
- package/docs/changelog/2024-08-02-lobe-chat-database-docker.zh-CN.mdx +5 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.mdx +6 -0
- package/docs/changelog/2024-08-21-file-upload-and-knowledge-base.zh-CN.mdx +5 -0
- package/docs/changelog/2024-09-13-openai-o1-models.mdx +6 -0
- package/docs/changelog/2024-09-13-openai-o1-models.zh-CN.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.mdx +6 -0
- package/docs/changelog/2024-09-20-artifacts.zh-CN.mdx +6 -0
- package/docs/changelog/2024-10-27-pin-assistant.mdx +5 -0
- package/docs/changelog/2024-10-27-pin-assistant.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.mdx +4 -0
- package/docs/changelog/2024-11-06-share-text-json.zh-CN.mdx +4 -0
- package/docs/changelog/2024-11-25-november-providers.mdx +7 -0
- package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +7 -0
- package/docs/changelog/2024-11-27-forkable-chat.mdx +4 -0
- package/docs/changelog/2024-11-27-forkable-chat.zh-CN.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.mdx +5 -0
- package/docs/changelog/2025-01-03-user-profile.zh-CN.mdx +4 -1
- package/docs/self-hosting/advanced/auth/clerk.mdx +25 -41
- package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +23 -37
- package/docs/self-hosting/advanced/auth/next-auth/auth0.mdx +31 -58
- package/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx +30 -57
- package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +38 -38
- package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +37 -38
- package/docs/self-hosting/advanced/auth/next-auth/authentik.mdx +26 -31
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +25 -30
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +74 -75
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +72 -73
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx +24 -25
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +23 -24
- package/docs/self-hosting/advanced/auth/next-auth/github.mdx +46 -73
- package/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx +43 -70
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +28 -37
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx +36 -49
- package/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx +30 -43
- package/docs/self-hosting/advanced/auth/next-auth/wechat.mdx +13 -14
- package/docs/self-hosting/advanced/auth/next-auth/wechat.zh-CN.mdx +14 -15
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx +35 -69
- package/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx +34 -68
- package/docs/self-hosting/advanced/auth.mdx +14 -13
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +15 -14
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +15 -15
- package/docs/self-hosting/advanced/knowledge-base.mdx +14 -3
- package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +12 -3
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +5 -5
- package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +52 -81
- package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +51 -80
- package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +20 -34
- package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +28 -43
- package/docs/self-hosting/advanced/s3.mdx +30 -34
- package/docs/self-hosting/advanced/s3.zh-CN.mdx +28 -33
- package/docs/self-hosting/advanced/settings-url-share.mdx +6 -6
- package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +19 -19
- package/docs/self-hosting/advanced/upstream-sync.mdx +73 -89
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +71 -87
- package/docs/self-hosting/advanced/webrtc.mdx +14 -21
- package/docs/self-hosting/advanced/webrtc.zh-CN.mdx +19 -26
- package/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +0 -3
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/basic.mdx +13 -13
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +15 -15
- package/docs/self-hosting/environment-variables/model-provider.mdx +1 -1
- package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables/s3.mdx +3 -4
- package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +5 -7
- package/docs/self-hosting/environment-variables.mdx +8 -4
- package/docs/self-hosting/environment-variables.zh-CN.mdx +4 -0
- package/docs/self-hosting/examples/azure-openai.mdx +9 -12
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +8 -11
- package/docs/self-hosting/examples/ollama.mdx +8 -7
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +8 -7
- package/docs/self-hosting/platform/alibaba-cloud.mdx +5 -7
- package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +5 -7
- package/docs/self-hosting/platform/btpanel.mdx +3 -2
- package/docs/self-hosting/platform/btpanel.zh-CN.mdx +3 -3
- package/docs/self-hosting/platform/docker-compose.mdx +75 -85
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +75 -85
- package/docs/self-hosting/platform/docker.mdx +87 -92
- package/docs/self-hosting/platform/docker.zh-CN.mdx +96 -115
- package/docs/self-hosting/platform/netlify.mdx +44 -94
- package/docs/self-hosting/platform/netlify.zh-CN.mdx +40 -90
- package/docs/self-hosting/platform/railway.mdx +6 -7
- package/docs/self-hosting/platform/railway.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.mdx +6 -7
- package/docs/self-hosting/platform/repocloud.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/sealos.mdx +6 -7
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +6 -7
- package/docs/self-hosting/platform/vercel.mdx +7 -8
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +7 -8
- package/docs/self-hosting/platform/zeabur.mdx +29 -32
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +29 -32
- package/docs/self-hosting/server-database/docker-compose.mdx +44 -71
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +44 -71
- package/docs/self-hosting/server-database/docker.mdx +84 -88
- package/docs/self-hosting/server-database/docker.zh-CN.mdx +87 -91
- package/docs/self-hosting/server-database/dokploy.mdx +18 -1
- package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +84 -68
- package/docs/self-hosting/server-database/repocloud.mdx +7 -9
- package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +9 -11
- package/docs/self-hosting/server-database/vercel.mdx +158 -243
- package/docs/self-hosting/server-database/vercel.zh-CN.mdx +137 -205
- package/docs/self-hosting/server-database/zeabur.mdx +21 -23
- package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +20 -22
- package/docs/self-hosting/server-database.mdx +34 -36
- package/docs/self-hosting/server-database.zh-CN.mdx +34 -37
- package/docs/self-hosting/start.mdx +1 -4
- package/docs/self-hosting/start.zh-CN.mdx +1 -1
- package/docs/usage/agents/agent-organization.mdx +5 -21
- package/docs/usage/agents/agent-organization.zh-CN.mdx +5 -21
- package/docs/usage/agents/concepts.mdx +4 -4
- package/docs/usage/agents/concepts.zh-CN.mdx +4 -4
- package/docs/usage/agents/custom-agent.mdx +2 -2
- package/docs/usage/agents/custom-agent.zh-CN.mdx +2 -2
- package/docs/usage/agents/model.mdx +4 -4
- package/docs/usage/agents/model.zh-CN.mdx +6 -6
- package/docs/usage/agents/prompt.mdx +5 -6
- package/docs/usage/agents/prompt.zh-CN.mdx +5 -6
- package/docs/usage/agents/topics.mdx +2 -2
- package/docs/usage/agents/topics.zh-CN.mdx +2 -2
- package/docs/usage/features/agent-market.mdx +2 -2
- package/docs/usage/features/agent-market.zh-CN.mdx +2 -2
- package/docs/usage/features/auth.mdx +1 -5
- package/docs/usage/features/auth.zh-CN.mdx +1 -5
- package/docs/usage/features/database.mdx +1 -5
- package/docs/usage/features/database.zh-CN.mdx +1 -5
- package/docs/usage/features/local-llm.mdx +2 -6
- package/docs/usage/features/local-llm.zh-CN.mdx +2 -6
- package/docs/usage/features/mobile.mdx +1 -5
- package/docs/usage/features/mobile.zh-CN.mdx +1 -5
- package/docs/usage/features/multi-ai-providers.mdx +3 -11
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +3 -11
- package/docs/usage/features/plugin-system.mdx +9 -10
- package/docs/usage/features/plugin-system.zh-CN.mdx +9 -10
- package/docs/usage/features/pwa.mdx +11 -25
- package/docs/usage/features/pwa.zh-CN.mdx +11 -25
- package/docs/usage/features/text-to-image.mdx +2 -2
- package/docs/usage/features/text-to-image.zh-CN.mdx +2 -2
- package/docs/usage/features/theme.mdx +1 -6
- package/docs/usage/features/theme.zh-CN.mdx +1 -6
- package/docs/usage/features/tts.mdx +3 -7
- package/docs/usage/features/tts.zh-CN.mdx +3 -7
- package/docs/usage/features/vision.mdx +2 -2
- package/docs/usage/features/vision.zh-CN.mdx +2 -2
- package/docs/usage/foundation/basic.mdx +7 -18
- package/docs/usage/foundation/basic.zh-CN.mdx +6 -16
- package/docs/usage/foundation/share.mdx +3 -13
- package/docs/usage/foundation/share.zh-CN.mdx +3 -13
- package/docs/usage/foundation/text2image.mdx +3 -12
- package/docs/usage/foundation/text2image.zh-CN.mdx +3 -12
- package/docs/usage/foundation/translate.mdx +3 -13
- package/docs/usage/foundation/translate.zh-CN.mdx +3 -13
- package/docs/usage/foundation/tts-stt.mdx +3 -12
- package/docs/usage/foundation/tts-stt.zh-CN.mdx +3 -12
- package/docs/usage/foundation/vision.mdx +4 -16
- package/docs/usage/foundation/vision.zh-CN.mdx +4 -16
- package/docs/usage/plugins/basic-usage.mdx +7 -30
- package/docs/usage/plugins/basic-usage.zh-CN.mdx +7 -30
- package/docs/usage/plugins/development.mdx +30 -78
- package/docs/usage/plugins/development.zh-CN.mdx +31 -79
- package/docs/usage/plugins/store.mdx +2 -10
- package/docs/usage/plugins/store.zh-CN.mdx +2 -10
- package/docs/usage/providers/ai21.mdx +17 -33
- package/docs/usage/providers/ai21.zh-CN.mdx +17 -33
- package/docs/usage/providers/ai360.mdx +17 -33
- package/docs/usage/providers/ai360.zh-CN.mdx +20 -36
- package/docs/usage/providers/anthropic.mdx +23 -45
- package/docs/usage/providers/anthropic.zh-CN.mdx +22 -44
- package/docs/usage/providers/azure.mdx +21 -51
- package/docs/usage/providers/azure.zh-CN.mdx +19 -48
- package/docs/usage/providers/baichuan.mdx +16 -34
- package/docs/usage/providers/baichuan.zh-CN.mdx +15 -33
- package/docs/usage/providers/bedrock.mdx +38 -87
- package/docs/usage/providers/bedrock.zh-CN.mdx +37 -86
- package/docs/usage/providers/cloudflare.mdx +25 -48
- package/docs/usage/providers/cloudflare.zh-CN.mdx +24 -45
- package/docs/usage/providers/deepseek.mdx +25 -51
- package/docs/usage/providers/deepseek.zh-CN.mdx +24 -50
- package/docs/usage/providers/fireworksai.mdx +23 -43
- package/docs/usage/providers/fireworksai.zh-CN.mdx +21 -41
- package/docs/usage/providers/gemini.mdx +20 -46
- package/docs/usage/providers/gemini.zh-CN.mdx +20 -46
- package/docs/usage/providers/giteeai.mdx +24 -45
- package/docs/usage/providers/giteeai.zh-CN.mdx +22 -43
- package/docs/usage/providers/github.mdx +19 -45
- package/docs/usage/providers/github.zh-CN.mdx +19 -44
- package/docs/usage/providers/groq.mdx +12 -29
- package/docs/usage/providers/groq.zh-CN.mdx +11 -28
- package/docs/usage/providers/hunyuan.mdx +19 -39
- package/docs/usage/providers/hunyuan.zh-CN.mdx +18 -38
- package/docs/usage/providers/internlm.mdx +21 -38
- package/docs/usage/providers/internlm.zh-CN.mdx +19 -36
- package/docs/usage/providers/minimax.mdx +24 -50
- package/docs/usage/providers/minimax.zh-CN.mdx +22 -48
- package/docs/usage/providers/mistral.mdx +21 -39
- package/docs/usage/providers/mistral.zh-CN.mdx +20 -38
- package/docs/usage/providers/moonshot.mdx +20 -38
- package/docs/usage/providers/moonshot.zh-CN.mdx +19 -37
- package/docs/usage/providers/novita.mdx +20 -43
- package/docs/usage/providers/novita.zh-CN.mdx +19 -42
- package/docs/usage/providers/ollama/gemma.mdx +12 -29
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +12 -30
- package/docs/usage/providers/ollama/qwen.mdx +17 -32
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +12 -27
- package/docs/usage/providers/ollama.mdx +67 -99
- package/docs/usage/providers/ollama.zh-CN.mdx +67 -99
- package/docs/usage/providers/openai.mdx +42 -56
- package/docs/usage/providers/openai.zh-CN.mdx +39 -52
- package/docs/usage/providers/openrouter.mdx +48 -84
- package/docs/usage/providers/openrouter.zh-CN.mdx +31 -67
- package/docs/usage/providers/perplexity.mdx +16 -34
- package/docs/usage/providers/perplexity.zh-CN.mdx +16 -34
- package/docs/usage/providers/qwen.mdx +26 -52
- package/docs/usage/providers/qwen.zh-CN.mdx +25 -51
- package/docs/usage/providers/sensenova.mdx +24 -45
- package/docs/usage/providers/sensenova.zh-CN.mdx +22 -43
- package/docs/usage/providers/siliconcloud.mdx +17 -33
- package/docs/usage/providers/siliconcloud.zh-CN.mdx +17 -33
- package/docs/usage/providers/spark.mdx +20 -40
- package/docs/usage/providers/spark.zh-CN.mdx +19 -39
- package/docs/usage/providers/stepfun.mdx +17 -35
- package/docs/usage/providers/stepfun.zh-CN.mdx +17 -35
- package/docs/usage/providers/taichu.mdx +16 -34
- package/docs/usage/providers/taichu.zh-CN.mdx +15 -33
- package/docs/usage/providers/togetherai.mdx +18 -40
- package/docs/usage/providers/togetherai.zh-CN.mdx +18 -40
- package/docs/usage/providers/upstage.mdx +18 -34
- package/docs/usage/providers/upstage.zh-CN.mdx +17 -33
- package/docs/usage/providers/wenxin.mdx +22 -42
- package/docs/usage/providers/wenxin.zh-CN.mdx +20 -40
- package/docs/usage/providers/xai.mdx +21 -38
- package/docs/usage/providers/xai.zh-CN.mdx +20 -37
- package/docs/usage/providers/zeroone.mdx +22 -48
- package/docs/usage/providers/zeroone.zh-CN.mdx +22 -48
- package/docs/usage/providers/zhipu.mdx +17 -35
- package/docs/usage/providers/zhipu.zh-CN.mdx +18 -34
- package/docs/usage/providers.mdx +1 -6
- package/docs/usage/providers.zh-CN.mdx +1 -6
- package/docs/usage/start.mdx +4 -18
- package/docs/usage/start.zh-CN.mdx +2 -19
- package/docs/usage/tools-calling/anthropic.mdx +18 -51
- package/docs/usage/tools-calling/anthropic.zh-CN.mdx +22 -55
- package/docs/usage/tools-calling/google.mdx +16 -23
- package/docs/usage/tools-calling/google.zh-CN.mdx +17 -24
- package/docs/usage/tools-calling/groq.mdx +9 -0
- package/docs/usage/tools-calling/groq.zh-CN.mdx +44 -70
- package/docs/usage/tools-calling/moonshot.mdx +9 -0
- package/docs/usage/tools-calling/openai.mdx +19 -44
- package/docs/usage/tools-calling/openai.zh-CN.mdx +20 -45
- package/docs/usage/tools-calling.mdx +9 -0
- package/docs/usage/tools-calling.zh-CN.mdx +60 -68
- package/package.json +42 -41
- package/scripts/mdxWorkflow/index.ts +7 -0
- package/src/app/(main)/(mobile)/me/(home)/features/Header.tsx +2 -1
- package/src/app/(main)/(mobile)/me/data/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/profile/features/Header.tsx +1 -1
- package/src/app/(main)/(mobile)/me/settings/features/Header.tsx +1 -1
- package/src/app/(main)/@nav/_layout/Mobile.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +2 -1
- package/src/app/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +1 -1
- package/src/app/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -1
- package/src/app/(main)/chat/settings/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/chat/settings/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/discover/(detail)/provider/[slug]/features/InfoSidebar/SuggestionItem.tsx +8 -6
- package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +1 -1
- package/src/app/(main)/discover/(list)/_layout/Mobile/Header.tsx +2 -1
- package/src/app/(main)/discover/_layout/Desktop/Header.tsx +1 -1
- package/src/app/(main)/discover/components/VirtuosoGridList/index.tsx +9 -5
- package/src/app/(main)/discover/search/_layout/Mobile/Header.tsx +1 -1
- package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +21 -13
- package/src/app/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +1 -1
- package/src/app/(main)/settings/sync/features/DeviceInfo/SystemIcon.tsx +2 -0
- package/src/components/Branding/ProductLogo/Custom.tsx +19 -20
- package/src/components/BrowserIcon/index.tsx +19 -30
- package/src/components/BubblesLoading/index.tsx +31 -23
- package/src/components/FunctionModal/createModalHooks.ts +6 -3
- package/src/components/StopLoading.tsx +10 -7
- package/src/database/repositories/aiInfra/index.ts +19 -7
- package/src/database/server/models/__tests__/aiModel.test.ts +4 -6
- package/src/database/server/models/aiModel.ts +6 -3
- package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
- package/src/features/InitClientDB/EnableModal.tsx +2 -2
- package/src/features/InitClientDB/{PGliteSVG.tsx → PGliteIcon.tsx} +17 -11
- package/src/features/ShareModal/ShareImage/index.tsx +32 -22
- package/src/features/ShareModal/ShareJSON/Preview.tsx +2 -2
- package/src/features/ShareModal/ShareJSON/index.tsx +49 -37
- package/src/features/ShareModal/ShareText/Preview.tsx +4 -1
- package/src/features/ShareModal/ShareText/index.tsx +49 -38
- package/src/features/ShareModal/index.tsx +1 -1
- package/src/features/ShareModal/style.ts +30 -0
- package/src/store/aiInfra/slices/aiProvider/action.ts +1 -1
- package/src/types/aiProvider.ts +1 -0
- package/src/utils/colorUtils.ts +1 -1
- package/src/components/BrowserIcon/components/Brave.tsx +0 -56
- package/src/components/BrowserIcon/components/Chrome.tsx +0 -14
- package/src/components/BrowserIcon/components/Chromium.tsx +0 -14
- package/src/components/BrowserIcon/components/Edge.tsx +0 -36
- package/src/components/BrowserIcon/components/Firefox.tsx +0 -38
- package/src/components/BrowserIcon/components/Opera.tsx +0 -19
- package/src/components/BrowserIcon/components/Safari.tsx +0 -23
- package/src/components/BrowserIcon/components/Samsung.tsx +0 -21
@@ -10,63 +10,49 @@ tags:
|
|
10
10
|
|
11
11
|
# 配置 Clerk 身份验证服务
|
12
12
|
|
13
|
-
前往 [Clerk](https://clerk.com?utm_source=lobehub
|
13
|
+
前往 [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。
|
14
14
|
|
15
15
|
## 获取环境变量
|
16
16
|
|
17
17
|
<Steps>
|
18
|
+
### 添加公、私钥环境变量
|
18
19
|
|
19
|
-
|
20
|
+
添加 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY` 环境变量。你可以在菜单中点击「API Keys」,然后复制对应的值获取该环境变量。
|
20
21
|
|
21
|
-
|
22
|
+
<Image alt={'在 Clerk 中找到对应的公私钥环境变量'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'} />
|
22
23
|
|
23
|
-
|
24
|
-
alt={'在 Clerk 中找到对应的公私钥环境变量'}
|
25
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'}
|
26
|
-
/>
|
24
|
+
此步骤所需的环境变量如下:
|
27
25
|
|
28
|
-
|
26
|
+
```shell
|
27
|
+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
|
28
|
+
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
29
|
+
```
|
29
30
|
|
30
|
-
|
31
|
-
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
|
32
|
-
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
33
|
-
```
|
31
|
+
### 在 Clerk 中创建并配置 Webhook
|
34
32
|
|
35
|
-
|
33
|
+
由于我们让 Clerk 完全接管用户鉴权与管理,因此我们需要在 Clerk 用户生命周期变更时(创建、更新、删除)中通知我们的应用并存储落库。我们通过 Clerk 提供的 Webhook 来实现这一诉求。
|
36
34
|
|
37
|
-
|
35
|
+
我们需要在 Clerk 的 Webhooks 中添加一个端点(Endpoint),告诉 Clerk 当用户发生变更时,向这个端点发送通知。
|
38
36
|
|
39
|
-
|
37
|
+
<Image alt={'Clerk 添加 Webhooks 端点'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'} />
|
40
38
|
|
41
|
-
|
42
|
-
alt={'Clerk 添加 Webhooks 端点'}
|
43
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
|
44
|
-
/>
|
39
|
+
在 endppint 中填写你的项目 URL,如 `https://your-project.com/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。
|
45
40
|
|
46
|
-
|
41
|
+
<Callout type={'warning'}>URL 的`https://`不可缺失,须保持 URL 的完整性</Callout>
|
47
42
|
|
48
|
-
<
|
43
|
+
<Image alt={'添加 Clerk Webhooks 时,配置 URL 和用户事件'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'} />
|
49
44
|
|
50
|
-
|
51
|
-
alt={'添加 Clerk Webhooks 时,配置 URL 和用户事件'}
|
52
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'}
|
53
|
-
/>
|
45
|
+
### 将 Webhook 秘钥添加到环境变量
|
54
46
|
|
55
|
-
|
47
|
+
创建完毕后,可以在右下角找到该 Webhook 的秘钥:
|
56
48
|
|
57
|
-
|
49
|
+
<Image alt={'查看 Clerk Webhooks 秘钥'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'} />
|
58
50
|
|
59
|
-
|
60
|
-
alt={'查看 Clerk Webhooks 秘钥'}
|
61
|
-
src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'}
|
62
|
-
/>
|
63
|
-
|
64
|
-
这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`:
|
65
|
-
|
66
|
-
```shell
|
67
|
-
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
68
|
-
```
|
51
|
+
这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`:
|
69
52
|
|
53
|
+
```shell
|
54
|
+
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
55
|
+
```
|
70
56
|
</Steps>
|
71
57
|
|
72
58
|
这样,你已经成功配置了 Clerk 身份验证服务。
|
@@ -19,74 +19,53 @@ tags:
|
|
19
19
|
<Steps>
|
20
20
|
### Create Auth0 Application
|
21
21
|
|
22
|
-
Register and log in to [Auth0][auth0-client-page], click on the "Applications" in the left navigation bar to switch to the application management interface, and click "Create Application" in the upper right corner to create an application.
|
22
|
+
Register and log in to [Auth0][auth0-client-page], click on the "Applications" in the left navigation bar to switch to the application management interface, and click "Create Application" in the upper right corner to create an application.
|
23
23
|
|
24
|
-
<Image
|
25
|
-
alt="Create Auth0 Application S1"
|
26
|
-
inStep
|
27
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86"
|
28
|
-
/>
|
24
|
+
<Image alt="Create Auth0 Application S1" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86" />
|
29
25
|
|
30
|
-
Fill in the application name you want to display to the organization users, choose any application type, and click "Create".
|
26
|
+
Fill in the application name you want to display to the organization users, choose any application type, and click "Create".
|
31
27
|
|
32
|
-
<Image
|
33
|
-
alt="Create Auth0 Application S2"
|
34
|
-
inStep
|
35
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc"
|
36
|
-
/>
|
28
|
+
<Image alt="Create Auth0 Application S2" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc" />
|
37
29
|
|
38
|
-
After successful creation, click on the corresponding application to enter the application details page, switch to the "Settings" tab, and you can see the corresponding configuration information.
|
30
|
+
After successful creation, click on the corresponding application to enter the application details page, switch to the "Settings" tab, and you can see the corresponding configuration information.
|
39
31
|
|
40
|
-
<Image
|
41
|
-
alt="Create Auth0 Application S3"
|
42
|
-
inStep
|
43
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6"
|
44
|
-
/>
|
32
|
+
<Image alt="Create Auth0 Application S3" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6" />
|
45
33
|
|
46
|
-
In the application configuration page, you also need to configure Allowed Callback URLs, where you should fill in:
|
34
|
+
In the application configuration page, you also need to configure Allowed Callback URLs, where you should fill in:
|
47
35
|
|
48
|
-
```bash
|
49
|
-
http(s)://your-domain/api/auth/callback/auth0
|
50
|
-
```
|
36
|
+
```bash
|
37
|
+
http(s)://your-domain/api/auth/callback/auth0
|
38
|
+
```
|
51
39
|
|
52
|
-
<Image
|
53
|
-
alt="Create Auth0 Application S4"
|
54
|
-
inStep
|
55
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9"
|
56
|
-
/>
|
40
|
+
<Image alt="Create Auth0 Application S4" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9" />
|
57
41
|
|
58
|
-
<Callout type={'important'}>
|
59
|
-
|
60
|
-
|
61
|
-
</Callout>
|
42
|
+
<Callout type={'important'}>
|
43
|
+
You can fill in or modify Allowed Callback URLs after deployment, but make sure the filled URL is
|
44
|
+
consistent with the deployed URL.
|
45
|
+
</Callout>
|
62
46
|
|
63
|
-
### Add Users
|
47
|
+
### Add Users
|
64
48
|
|
65
|
-
Click on the "Users Management" in the left navigation bar to enter the user management interface, where you can create users for your organization to log in to LobeChat.
|
49
|
+
Click on the "Users Management" in the left navigation bar to enter the user management interface, where you can create users for your organization to log in to LobeChat.
|
66
50
|
|
67
|
-
<Image
|
68
|
-
alt="Add Users"
|
69
|
-
inStep
|
70
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96"
|
71
|
-
/>
|
51
|
+
<Image alt="Add Users" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96" />
|
72
52
|
|
73
|
-
### Configure Environment Variables
|
53
|
+
### Configure Environment Variables
|
74
54
|
|
75
|
-
When deploying LobeChat, you need to configure the following environment variables:
|
55
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
76
56
|
|
77
|
-
| Environment Variable
|
78
|
-
|
|
79
|
-
| `NEXT_AUTH_SECRET`
|
80
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `auth0` for Auth0.
|
81
|
-
| `AUTH_AUTH0_ID`
|
82
|
-
| `AUTH_AUTH0_SECRET`
|
83
|
-
| `AUTH_AUTH0_ISSUER`
|
84
|
-
| `NEXTAUTH_URL`
|
57
|
+
| Environment Variable | Type | Description |
|
58
|
+
| ------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
59
|
+
| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` |
|
60
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `auth0` for Auth0. |
|
61
|
+
| `AUTH_AUTH0_ID` | Required | Client ID of the Auth0 application |
|
62
|
+
| `AUTH_AUTH0_SECRET` | Required | Client Secret of the Auth0 application |
|
63
|
+
| `AUTH_AUTH0_ISSUER` | Required | Domain of the Auth0 application, `https://example.auth0.com` |
|
64
|
+
| `NEXTAUTH_URL` | Required | The URL is used to specify the callback address for the execution of OAuth authentication in Auth.js. It needs to be set only when the default address is incorrect. `https://example.com/api/auth` |
|
85
65
|
|
86
66
|
<Callout type={'tip'}>
|
87
67
|
You can refer to the related variable details at [📘Environment Variables](/docs/self-hosting/environment-variable#auth0).
|
88
|
-
|
89
|
-
</Callout>
|
68
|
+
</Callout>
|
90
69
|
</Steps>
|
91
70
|
|
92
71
|
<Callout>
|
@@ -102,19 +81,13 @@ If your enterprise or organization already has a unified identity authentication
|
|
102
81
|
|
103
82
|
Auth0 supports single sign-on services such as Azure Active Directory, Slack, Google Workspace, Office 365, Zoom, and more. For a detailed list of supported services, please refer to [this link][auth0-sso-integrations].
|
104
83
|
|
105
|
-
<Image
|
106
|
-
alt="Connecting to an Existing Single Sign-On Service"
|
107
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec"
|
108
|
-
/>
|
84
|
+
<Image alt="Connecting to an Existing Single Sign-On Service" src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec" />
|
109
85
|
|
110
86
|
### Configuring Social Login
|
111
87
|
|
112
88
|
If your enterprise or organization needs to support external user logins, you can configure social login services in Authentication -> Social.
|
113
89
|
|
114
|
-
<Image
|
115
|
-
alt="Configuring Social Login"
|
116
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa"
|
117
|
-
/>
|
90
|
+
<Image alt="Configuring Social Login" src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa" />
|
118
91
|
|
119
92
|
<Callout type={'warning'}>
|
120
93
|
Configuring social login services by default allows anyone to authenticate, which may lead to
|
@@ -15,73 +15,52 @@ tags:
|
|
15
15
|
<Steps>
|
16
16
|
### 创建 Auth0 应用
|
17
17
|
|
18
|
-
注册并登录 [Auth0](https://manage.auth0.com/dashboard),点击左侧导航栏的「Applications」,切换到应用管理界面,点击右上角「Create Application」以创建应用。
|
18
|
+
注册并登录 [Auth0](https://manage.auth0.com/dashboard),点击左侧导航栏的「Applications」,切换到应用管理界面,点击右上角「Create Application」以创建应用。
|
19
19
|
|
20
|
-
<Image
|
21
|
-
alt="创建 Auth0 应用 S1"
|
22
|
-
inStep
|
23
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86"
|
24
|
-
/>
|
20
|
+
<Image alt="创建 Auth0 应用 S1" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86" />
|
25
21
|
|
26
|
-
填写你想向组织用户显示的应用名称,可选择任意应用类型,点击「Create」。
|
22
|
+
填写你想向组织用户显示的应用名称,可选择任意应用类型,点击「Create」。
|
27
23
|
|
28
|
-
<Image
|
29
|
-
alt="创建 Auth0 应用 S2"
|
30
|
-
inStep
|
31
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc"
|
32
|
-
/>
|
24
|
+
<Image alt="创建 Auth0 应用 S2" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc" />
|
33
25
|
|
34
|
-
创建成功后,点击相应的应用,进入应用详情页,切换到「Settings」标签页,就可以看到相应的配置信息
|
26
|
+
创建成功后,点击相应的应用,进入应用详情页,切换到「Settings」标签页,就可以看到相应的配置信息
|
35
27
|
|
36
|
-
<Image
|
37
|
-
alt="创建 Auth0 应用 S3"
|
38
|
-
inStep
|
39
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6"
|
40
|
-
/>
|
28
|
+
<Image alt="创建 Auth0 应用 S3" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6" />
|
41
29
|
|
42
|
-
在应用配置页面中,还需要配置 Allowed Callback URLs,在此处填写:
|
30
|
+
在应用配置页面中,还需要配置 Allowed Callback URLs,在此处填写:
|
43
31
|
|
44
|
-
```bash
|
45
|
-
http(s)://your-domain/api/auth/callback/auth0
|
46
|
-
```
|
32
|
+
```bash
|
33
|
+
http(s)://your-domain/api/auth/callback/auth0
|
34
|
+
```
|
47
35
|
|
48
|
-
<Image
|
49
|
-
alt="创建 Auth0 应用 S4"
|
50
|
-
inStep
|
51
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9"
|
52
|
-
/>
|
36
|
+
<Image alt="创建 Auth0 应用 S4" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9" />
|
53
37
|
|
54
|
-
<Callout type={'important'}>
|
55
|
-
|
56
|
-
</Callout>
|
38
|
+
<Callout type={'important'}>
|
39
|
+
可以在部署后再填写或修改 Allowed Callback URLs,但是务必保证填写的 URL 与部署的 URL 一致
|
40
|
+
</Callout>
|
57
41
|
|
58
|
-
### 新增用户
|
42
|
+
### 新增用户
|
59
43
|
|
60
|
-
点击左侧导航栏的「Users Management」,进入用户管理界面,可以为你的组织新建用户,用以登录 LobeChat
|
44
|
+
点击左侧导航栏的「Users Management」,进入用户管理界面,可以为你的组织新建用户,用以登录 LobeChat
|
61
45
|
|
62
|
-
<Image
|
63
|
-
alt="新增用户"
|
64
|
-
inStep
|
65
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96"
|
66
|
-
/>
|
46
|
+
<Image alt="新增用户" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96" />
|
67
47
|
|
68
|
-
### 配置环境变量
|
48
|
+
### 配置环境变量
|
69
49
|
|
70
|
-
在部署 LobeChat 时,你需要配置以下环境变量:
|
50
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
71
51
|
|
72
|
-
| 环境变量
|
73
|
-
|
|
74
|
-
| `NEXT_AUTH_SECRET`
|
75
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。
|
76
|
-
| `AUTH_AUTH0_ID`
|
77
|
-
| `AUTH_AUTH0_SECRET`
|
78
|
-
| `AUTH_AUTH0_ISSUER`
|
79
|
-
| `NEXTAUTH_URL`
|
52
|
+
| 环境变量 | 类型 | 描述 |
|
53
|
+
| ------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
54
|
+
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
55
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。 |
|
56
|
+
| `AUTH_AUTH0_ID` | 必选 | Auth0 应用程序的 Client ID |
|
57
|
+
| `AUTH_AUTH0_SECRET` | 必选 | Auth0 应用程序的 Client Secret |
|
58
|
+
| `AUTH_AUTH0_ISSUER` | 必选 | Auth0 应用程序的 Domain,`https://example.auth0.com` |
|
59
|
+
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
80
60
|
|
81
61
|
<Callout type={'tip'}>
|
82
62
|
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#auth-0) 可查阅相关变量详情。
|
83
|
-
|
84
|
-
</Callout>
|
63
|
+
</Callout>
|
85
64
|
</Steps>
|
86
65
|
|
87
66
|
<Callout type={'info'}>
|
@@ -96,19 +75,13 @@ http(s)://your-domain/api/auth/callback/auth0
|
|
96
75
|
|
97
76
|
Auth0 支持 Azure Active Directory / Slack / Google Workspace / Office 365 / Zoom 等单点登录服务,详细支持列表可参考 [这里](https://marketplace.auth0.com/features/sso-integrations)
|
98
77
|
|
99
|
-
<Image
|
100
|
-
alt="Connecting to an Existing Single Sign-On Service"
|
101
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec"
|
102
|
-
/>
|
78
|
+
<Image alt="Connecting to an Existing Single Sign-On Service" src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec" />
|
103
79
|
|
104
80
|
### 配置社交登录
|
105
81
|
|
106
82
|
如果你的企业或组织需要支持外部人员登录,可以在 Authentication -> Social 中,配置社交登录服务。
|
107
83
|
|
108
|
-
<Image
|
109
|
-
alt="Configuring Social Login"
|
110
|
-
src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa"
|
111
|
-
/>
|
84
|
+
<Image alt="Configuring Social Login" src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa" />
|
112
85
|
|
113
86
|
<Callout type={'warning'}>
|
114
87
|
配置社交登录服务默认会允许所有人通过认证,这可能会导致 LobeChat 被外部人员滥用。
|
@@ -17,54 +17,54 @@ tags:
|
|
17
17
|
## Authelia Configuration Flow
|
18
18
|
|
19
19
|
<Steps>
|
20
|
-
### Create an Authelia Identity Provider
|
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
|
22
|
+
We assume you are already familiar with using Authelia. Let's say your LobeChat instance is deployed at [https://lobe.example.com/](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.
|
23
23
|
|
24
|
-
Now, let's open and edit the configuration file of your Authelia instance:
|
24
|
+
Now, let's open and edit the configuration file of your Authelia instance:
|
25
25
|
|
26
|
-
Add a new lobe-chat item under identity_providers -> oidc
|
26
|
+
Add a new lobe-chat item under `identity_providers` -> `oidc`:
|
27
27
|
|
28
|
-
```yaml
|
29
|
-
identity_providers:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
```
|
28
|
+
```yaml
|
29
|
+
identity_providers:
|
30
|
+
oidc:
|
31
|
+
...
|
32
|
+
## The other portions of the mandatory OpenID Connect 1.0 configuration go here.
|
33
|
+
## See: https://www.authelia.com/c/oidc
|
34
|
+
- id: lobe-chat
|
35
|
+
description: LobeChat
|
36
|
+
secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'.
|
37
|
+
public: false
|
38
|
+
authorization_policy: two_factor
|
39
|
+
redirect_uris:
|
40
|
+
- https://chat.example.com/api/auth/callback/authelia
|
41
|
+
scopes:
|
42
|
+
- openid
|
43
|
+
- profile
|
44
|
+
- email
|
45
|
+
userinfo_signing_algorithm: none
|
46
|
+
```
|
47
47
|
|
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.
|
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.
|
49
49
|
|
50
|
-
Save the configuration file and restart the Authelia service. Now we have completed the Authelia configuration.
|
50
|
+
Save the configuration file and restart the Authelia service. Now we have completed the Authelia configuration.
|
51
51
|
|
52
|
-
### Configure Environment Variables
|
52
|
+
### Configure Environment Variables
|
53
53
|
|
54
|
-
When deploying LobeChat, you need to configure the following environment variables:
|
54
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
55
55
|
|
56
|
-
| Environment Variable
|
57
|
-
|
|
58
|
-
| `NEXT_AUTH_SECRET`
|
59
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik.
|
60
|
-
| `AUTH_AUTHELIA_ID`
|
61
|
-
| `AUTH_AUTHELIA_SECRET`
|
62
|
-
| `AUTH_AUTHELIA_ISSUER`
|
63
|
-
| `NEXTAUTH_URL`
|
56
|
+
| Environment Variable | Type | Description |
|
57
|
+
| ------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
58
|
+
| `NEXT_AUTH_SECRET` | Required | The secret used to encrypt Auth.js session tokens. You can generate a secret using the following command: `openssl rand -base64 32` |
|
59
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik. |
|
60
|
+
| `AUTH_AUTHELIA_ID` | Required | The id just configured in Authelia, example value is lobe-chat |
|
61
|
+
| `AUTH_AUTHELIA_SECRET` | Required | The plaintext corresponding to the secret just configured in Authelia, example value is `insecure_secret` |
|
62
|
+
| `AUTH_AUTHELIA_ISSUER` | Required | Your Authelia URL, for example [https://sso.example.com](https://sso.example.com) |
|
63
|
+
| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth verification. It only needs to be set when the default generated redirect address is incorrect. [https://chat.example.com/api/auth](https://chat.example.com/api/auth) |
|
64
64
|
|
65
|
-
<Callout type={'tip'}>
|
66
|
-
|
67
|
-
</Callout>
|
65
|
+
<Callout type={'tip'}>
|
66
|
+
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authelia) for details about the variables.
|
67
|
+
</Callout>
|
68
68
|
</Steps>
|
69
69
|
|
70
70
|
<Callout type={'info'}>
|
@@ -14,56 +14,55 @@ tags:
|
|
14
14
|
## Authelia 配置流程
|
15
15
|
|
16
16
|
<Steps>
|
17
|
-
### 创建 Authelia 提供应用
|
17
|
+
### 创建 Authelia 提供应用
|
18
18
|
|
19
|
-
我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/` 中。注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。
|
19
|
+
我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/` 中。注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。
|
20
20
|
|
21
|
-
现在,我们打开 Authelia 实例的配置文件进行编辑:
|
21
|
+
现在,我们打开 Authelia 实例的配置文件进行编辑:
|
22
22
|
|
23
|
-
在 `identity_providers`-> `oidc` 下新增一个 `lobe-chat` 的项目:
|
23
|
+
在 `identity_providers`-> `oidc` 下新增一个 `lobe-chat` 的项目:
|
24
24
|
|
25
|
-
```yaml
|
26
|
-
...
|
27
|
-
identity_providers:
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
```
|
25
|
+
```yaml
|
26
|
+
...
|
27
|
+
identity_providers:
|
28
|
+
oidc:
|
29
|
+
...
|
30
|
+
## The other portions of the mandatory OpenID Connect 1.0 configuration go here.
|
31
|
+
## See: https://www.authelia.com/c/oidc
|
32
|
+
- id: lobe-chat
|
33
|
+
description: LobeChat
|
34
|
+
secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'.
|
35
|
+
public: false
|
36
|
+
authorization_policy: two_factor
|
37
|
+
redirect_uris:
|
38
|
+
- https://chat.example.com/api/auth/callback/authelia
|
39
|
+
scopes:
|
40
|
+
- openid
|
41
|
+
- profile
|
42
|
+
- email
|
43
|
+
userinfo_signing_algorithm: none
|
44
|
+
```
|
45
45
|
|
46
|
-
请您确保 `secret` 和 `redirect_urls` 替换成您自己的值。注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。
|
46
|
+
请您确保 `secret` 和 `redirect_urls` 替换成您自己的值。注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。
|
47
47
|
|
48
|
-
保存配置文件,然后重启 Authelia 服务。现在我们完成了 Authelia 的配置工作。
|
48
|
+
保存配置文件,然后重启 Authelia 服务。现在我们完成了 Authelia 的配置工作。
|
49
49
|
|
50
|
-
### 配置环境变量
|
50
|
+
### 配置环境变量
|
51
51
|
|
52
|
-
在部署 LobeChat 时,你需要配置以下环境变量:
|
52
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
53
53
|
|
54
|
-
| 环境变量
|
55
|
-
|
|
56
|
-
| `NEXT_AUTH_SECRET`
|
57
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authelia 请填写 `authelia`。
|
58
|
-
| `AUTH_AUTHELIA_ID`
|
59
|
-
| `AUTH_AUTHELIA_SECRET`
|
60
|
-
| `AUTH_AUTHELIA_ISSUER`
|
61
|
-
| `NEXTAUTH_URL`
|
54
|
+
| 环境变量 | 类型 | 描述 |
|
55
|
+
| ------------------------- | -- | ------------------------------------------------------------------------------------------------ |
|
56
|
+
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
57
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authelia 请填写 `authelia`。 |
|
58
|
+
| `AUTH_AUTHELIA_ID` | 必选 | 刚刚在 Authelia 配置的 `id`,示例值是 `lobe-chat` |
|
59
|
+
| `AUTH_AUTHELIA_SECRET` | 必选 | 刚刚在 Authelia 配置的 `secret` 对应的明文,示例值是 `insecure_secret` |
|
60
|
+
| `AUTH_AUTHELIA_ISSUER` | 必选 | 您的 Authelia 的网址,例如 `https://sso.example.com` |
|
61
|
+
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
62
62
|
|
63
63
|
<Callout type={'tip'}>
|
64
64
|
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Authelia) 可查阅相关变量详情。
|
65
|
-
|
66
|
-
</Callout>
|
65
|
+
</Callout>
|
67
66
|
</Steps>
|
68
67
|
|
69
68
|
<Callout type={'info'}>
|
@@ -19,52 +19,47 @@ tags:
|
|
19
19
|
<Steps>
|
20
20
|
### Create an Authentik Application Provider
|
21
21
|
|
22
|
-
In your Authentik instance, use the administrator account to go to **Admin Interface** -> **Applications** -> **Providers** and create a new provider.
|
22
|
+
In your Authentik instance, use the administrator account to go to **Admin Interface** -> **Applications** -> **Providers** and create a new provider.
|
23
23
|
|
24
|
-
Select **OAuth2/OpenID Provider** as the provider type. Fill in the provider name, select the authentication flow and authorization flow.
|
24
|
+
Select **OAuth2/OpenID Provider** as the provider type. Fill in the provider name, select the authentication flow and authorization flow.
|
25
25
|
|
26
|
-
In the `Redirect URL/Origin (regex)` field, fill in:
|
26
|
+
In the `Redirect URL/Origin (regex)` field, fill in:
|
27
27
|
|
28
|
-
```bash
|
29
|
-
https://your-domain/api/auth/callback/authentik
|
30
|
-
```
|
28
|
+
```bash
|
29
|
+
https://your-domain/api/auth/callback/authentik
|
30
|
+
```
|
31
31
|
|
32
|
-
<Callout type={'info'}>
|
33
|
-
|
34
|
-
|
35
|
-
</Callout>
|
32
|
+
<Callout type={'info'}>
|
33
|
+
- You can fill in or modify the `Redirect URL/Origin (regex)` later, but make sure the filled in
|
34
|
+
URL matches the deployed URL. - Replace `your-domain` with your own domain name
|
35
|
+
</Callout>
|
36
36
|
|
37
|
-
<Image
|
38
|
-
alt="Create Authentik Provider"
|
39
|
-
inStep
|
40
|
-
src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b"
|
41
|
-
/>
|
37
|
+
<Image alt="Create Authentik Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b" />
|
42
38
|
|
43
|
-
Click **Done**
|
39
|
+
Click **Done**
|
44
40
|
|
45
|
-
After the creation is successful, click **Applications** on the left -> **Create**, fill in the name and Slug, select the provider created in the previous step, and click **Create**.
|
41
|
+
After the creation is successful, click **Applications** on the left -> **Create**, fill in the name and Slug, select the provider created in the previous step, and click **Create**.
|
46
42
|
|
47
|
-
After the application provider is created, click the corresponding provider to enter the details page, click **Edit**, and save the `Client ID` and `Client Secret`.
|
43
|
+
After the application provider is created, click the corresponding provider to enter the details page, click **Edit**, and save the `Client ID` and `Client Secret`.
|
48
44
|
|
49
|
-
Copy the URL of `OpenID Configuration Issuer` and save it.
|
45
|
+
Copy the URL of `OpenID Configuration Issuer` and save it.
|
50
46
|
|
51
|
-
### Configure Environment Variables
|
47
|
+
### Configure Environment Variables
|
52
48
|
|
53
|
-
When deploying LobeChat, you need to configure the following environment variables:
|
49
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
54
50
|
|
55
|
-
| Environment Variable
|
56
|
-
|
|
57
|
-
| `NEXT_AUTH_SECRET`
|
58
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik.
|
59
|
-
| `AUTH_AUTHENTIK_ID`
|
60
|
-
| `AUTH_AUTHENTIK_SECRET`
|
61
|
-
| `AUTH_AUTHENTIK_ISSUER`
|
62
|
-
| `NEXTAUTH_URL`
|
51
|
+
| Environment Variable | Type | Description |
|
52
|
+
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
53
|
+
| `NEXT_AUTH_SECRET` | Required | The secret used to encrypt Auth.js session tokens. You can generate a secret using the following command: `openssl rand -base64 32` |
|
54
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik. |
|
55
|
+
| `AUTH_AUTHENTIK_ID` | Required | The Client ID from the Authentik application provider details page |
|
56
|
+
| `AUTH_AUTHENTIK_SECRET` | Required | The Client Secret from the Authentik application provider details page |
|
57
|
+
| `AUTH_AUTHENTIK_ISSUER` | Required | The OpenID Configuration Issuer from the Authentik application provider details page |
|
58
|
+
| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It only needs to be set when the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
63
59
|
|
64
60
|
<Callout type={'tip'}>
|
65
61
|
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authentik) for details about the variables.
|
66
|
-
|
67
|
-
</Callout>
|
62
|
+
</Callout>
|
68
63
|
</Steps>
|
69
64
|
|
70
65
|
<Callout type={'info'}>
|