@lobehub/chat 1.44.3 → 1.45.1
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/next.config.ts +1 -0
- package/package.json +48 -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/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/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
@@ -19,79 +19,52 @@ tags:
|
|
19
19
|
<Steps>
|
20
20
|
### Create a Github Provider
|
21
21
|
|
22
|
-
Click [here][github-create-app] to create a new Github App.
|
23
|
-
|
24
|
-
Fill in the Github App name, Homepage URL, and Callback URL.
|
25
|
-
|
26
|
-
<Image
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
/>
|
31
|
-
|
32
|
-
Set the
|
33
|
-
|
34
|
-
<Image
|
35
|
-
|
36
|
-
inStep
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
Set
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
/>
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
src="https://github.com/lobehub/lobe-chat/assets/64475363/
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29"
|
69
|
-
/>
|
70
|
-
|
71
|
-
After successful creation, save the `Client ID` and `Client Secret`.
|
72
|
-
|
73
|
-
<Image
|
74
|
-
alt="Create a new client secret"
|
75
|
-
inStep
|
76
|
-
src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4"
|
77
|
-
/>
|
78
|
-
|
79
|
-
### Configure Environment Variables
|
80
|
-
|
81
|
-
When deploying LobeChat, you need to configure the following environment variables:
|
82
|
-
|
83
|
-
| Environment Variable | Type | Description |
|
84
|
-
| --- | --- | --- |
|
85
|
-
| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
|
86
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. |
|
87
|
-
| `AUTH_GITHUB_ID` | Required | Client ID in the Github App details page. |
|
88
|
-
| `AUTH_GITHUB_SECRET` | Required | Client Secret in the Github App details page. |
|
89
|
-
| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
90
|
-
|
91
|
-
<Callout type={'tip'}>
|
92
|
-
Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
|
93
|
-
information on these variables.
|
94
|
-
</Callout>
|
22
|
+
Click [here][github-create-app] to create a new Github App.
|
23
|
+
|
24
|
+
Fill in the Github App name, Homepage URL, and Callback URL.
|
25
|
+
|
26
|
+
<Image alt="Create a Github Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
|
27
|
+
|
28
|
+
Set the webhook callback URL according to your needs.
|
29
|
+
|
30
|
+
<Image alt="Fill in other fields" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
|
31
|
+
|
32
|
+
Set the permission to read email addresses.
|
33
|
+
|
34
|
+
<Image alt="Set required permissions" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
|
35
|
+
|
36
|
+
<Image alt="Set permission to read email addresses" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
|
37
|
+
|
38
|
+
Set whether it is accessible publicly or only accessible to yourself.
|
39
|
+
|
40
|
+
<Image alt="Set whether it is accessible publicly or only accessible to yourself" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
|
41
|
+
|
42
|
+
Click "Create Github App".
|
43
|
+
|
44
|
+
After successful creation, click "Generate a new client secret" to create a client secret.
|
45
|
+
|
46
|
+
<Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
|
47
|
+
|
48
|
+
After successful creation, save the `Client ID` and `Client Secret`.
|
49
|
+
|
50
|
+
<Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
|
51
|
+
|
52
|
+
### Configure Environment Variables
|
53
|
+
|
54
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
55
|
+
|
56
|
+
| Environment Variable | Type | Description |
|
57
|
+
| ------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
58
|
+
| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` |
|
59
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. |
|
60
|
+
| `AUTH_GITHUB_ID` | Required | Client ID in the Github App details page. |
|
61
|
+
| `AUTH_GITHUB_SECRET` | Required | Client Secret in the Github App details page. |
|
62
|
+
| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
63
|
+
|
64
|
+
<Callout type={'tip'}>
|
65
|
+
Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
|
66
|
+
information on these variables.
|
67
|
+
</Callout>
|
95
68
|
</Steps>
|
96
69
|
|
97
70
|
<Callout type={'info'}>
|
@@ -16,78 +16,51 @@ tags:
|
|
16
16
|
<Steps>
|
17
17
|
### 创建 Github 提供应用
|
18
18
|
|
19
|
-
点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。
|
20
|
-
|
21
|
-
填写 Github App name、Homepage URL、Callbak URL
|
22
|
-
|
23
|
-
<Image
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
/>
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
alt="
|
32
|
-
|
33
|
-
src="https://github.com/lobehub/lobe-chat/assets/64475363/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<Image
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
/>
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<Image
|
62
|
-
alt="创建新的客户端密钥"
|
63
|
-
inStep
|
64
|
-
src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29"
|
65
|
-
/>
|
66
|
-
|
67
|
-
创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
|
68
|
-
|
69
|
-
<Image
|
70
|
-
alt="创建新的客户端密钥"
|
71
|
-
inStep
|
72
|
-
src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4"
|
73
|
-
/>
|
74
|
-
|
75
|
-
### 配置环境变量
|
76
|
-
|
77
|
-
在部署 LobeChat 时,你需要配置以下环境变量:
|
78
|
-
|
79
|
-
| 环境变量 | 类型 | 描述 |
|
80
|
-
| --- | --- | --- |
|
81
|
-
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
82
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
83
|
-
| `AUTH_GITHUB_ID` | 必选 | Github App详情页的 客户端 ID |
|
84
|
-
| `AUTH_GITHUB_SECRET` | 必选 | Github App详情页的 客户端 Secret |
|
85
|
-
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
19
|
+
点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。
|
20
|
+
|
21
|
+
填写 Github App name、Homepage URL、Callbak URL
|
22
|
+
|
23
|
+
<Image alt="创建 Github 提供程序" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
|
24
|
+
|
25
|
+
按照自己所需设置 Webhook 回调地址
|
26
|
+
|
27
|
+
<Image alt="填写其他字段" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
|
28
|
+
|
29
|
+
设置读取邮件地址权限
|
30
|
+
|
31
|
+
<Image alt="设置所需权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
|
32
|
+
|
33
|
+
<Image alt="设置读取邮件地址权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
|
34
|
+
|
35
|
+
设置公开访问还是仅自己访问
|
36
|
+
|
37
|
+
<Image alt="设置公开访问还是仅自己访问" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
|
38
|
+
|
39
|
+
点击「Create Github App」
|
40
|
+
|
41
|
+
创建成功后,点击「Generate a new client secret」创建客户端 Secret
|
42
|
+
|
43
|
+
<Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
|
44
|
+
|
45
|
+
创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
|
46
|
+
|
47
|
+
<Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
|
48
|
+
|
49
|
+
### 配置环境变量
|
50
|
+
|
51
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
52
|
+
|
53
|
+
| 环境变量 | 类型 | 描述 |
|
54
|
+
| ------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
55
|
+
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
56
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
57
|
+
| `AUTH_GITHUB_ID` | 必选 | Github App 详情页的 客户端 ID |
|
58
|
+
| `AUTH_GITHUB_SECRET` | 必选 | Github App 详情页的 客户端 Secret |
|
59
|
+
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
86
60
|
|
87
61
|
<Callout type={'tip'}>
|
88
62
|
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#github) 可查阅相关变量详情。
|
89
|
-
|
90
|
-
</Callout>
|
63
|
+
</Callout>
|
91
64
|
</Steps>
|
92
65
|
|
93
|
-
<Callout type={'info'}>部署成功后,用户将可以通过Github身份认证并使用 LobeChat。</Callout>
|
66
|
+
<Callout type={'info'}>部署成功后,用户将可以通过 Github 身份认证并使用 LobeChat。</Callout>
|
@@ -31,52 +31,43 @@ 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
|
43
|
-
alt="Configure Logto"
|
44
|
-
inStep
|
45
|
-
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
46
|
-
/>
|
42
|
+
<Image alt="Configure Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
|
47
43
|
|
48
|
-
After successful creation, save the `Client ID` and `Client Secret`.
|
44
|
+
After successful creation, save the `Client ID` and `Client Secret`.
|
49
45
|
|
50
|
-
### Configure Environment Variables
|
46
|
+
### Configure Environment Variables
|
51
47
|
|
52
|
-
<Image
|
53
|
-
alt="Configure Environment Variables"
|
54
|
-
inStep
|
55
|
-
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
56
|
-
/>
|
48
|
+
<Image alt="Configure Environment Variables" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
|
57
49
|
|
58
|
-
Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
|
50
|
+
Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
|
59
51
|
|
60
|
-
Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
|
52
|
+
Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
|
61
53
|
|
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
|
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
|
64
56
|
|
65
|
-
When deploying LobeChat, you need to configure the following environment variables:
|
57
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
66
58
|
|
67
|
-
| Environment Variable
|
68
|
-
|
|
69
|
-
| `NEXT_AUTH_SECRET`
|
70
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`.
|
71
|
-
| `AUTH_LOGTO_ID`
|
72
|
-
| `AUTH_LOGTO_SECRET`
|
73
|
-
| `AUTH_LOGTO_ISSUER`
|
74
|
-
| `NEXTAUTH_URL`
|
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` |
|
75
67
|
|
76
68
|
<Callout type={'tip'}>
|
77
69
|
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#logto) for details on related variables.
|
78
|
-
|
79
|
-
</Callout>
|
70
|
+
</Callout>
|
80
71
|
</Steps>
|
81
72
|
|
82
73
|
### Troubleshooting
|
@@ -84,22 +75,22 @@ When deploying LobeChat, you need to configure the following environment variabl
|
|
84
75
|
If you encounter issues during the Logto deployment process, refer to the following common problems:
|
85
76
|
|
86
77
|
- `Only roles with the xxx attribute may create roles`:
|
87
|
-
Check your database user's permissions and ensure that the user in your Logto database has the `admin` role to create roles.
|
78
|
+
Check your database user's permissions and ensure that the user in your Logto database has the `admin` role to create roles.
|
88
79
|
|
89
80
|
- Error executing `logto db seed` on third-party databases like `Neon`:
|
90
|
-
Try using the `logto db seed --encrypt-base-role` command.
|
81
|
+
Try using the `logto db seed --encrypt-base-role` command.
|
91
82
|
|
92
83
|
- Database seeding failed:
|
93
|
-
Try skipping the seeding process with the `--skip-seed` parameter.
|
84
|
+
Try skipping the seeding process with the `--skip-seed` parameter.
|
94
85
|
|
95
86
|
- `Error: role xxx already exists`:
|
96
|
-
Delete the existing role in the database.
|
87
|
+
Delete the existing role in the database.
|
97
88
|
|
98
89
|
- Database migration failed after a version upgrade:
|
99
|
-
Try using the command `npx @logto/cli db alteration deploy $version` (e.g., `npx @logto/cli db alteration deploy 1.22.0`).
|
90
|
+
Try using the command `npx @logto/cli db alteration deploy $version` (e.g., `npx @logto/cli db alteration deploy 1.22.0`).
|
100
91
|
|
101
92
|
- I am using Docker deployment and want a one-click upgrade:
|
102
|
-
Execute the custom command in the container: `sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
|
93
|
+
Execute the custom command in the container: `sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
|
103
94
|
|
104
95
|
<Callout type={'info'}>
|
105
96
|
After successful deployment, users will be able to authenticate via Logto and use LobeChat.
|
@@ -28,52 +28,43 @@ tags:
|
|
28
28
|
<Steps>
|
29
29
|
### 创建 Logto 应用
|
30
30
|
|
31
|
-
访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意
|
31
|
+
访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意
|
32
32
|
|
33
|
-
### 配置 Logto
|
33
|
+
### 配置 Logto
|
34
34
|
|
35
|
-
配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/`
|
35
|
+
配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/`
|
36
36
|
|
37
|
-
配置 `CORS allowed origins` 为 `https://lobe.example.com`
|
37
|
+
配置 `CORS allowed origins` 为 `https://lobe.example.com`
|
38
38
|
|
39
|
-
<Image
|
40
|
-
alt="配置 Logto"
|
41
|
-
inStep
|
42
|
-
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
43
|
-
/>
|
39
|
+
<Image alt="配置 Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
|
44
40
|
|
45
|
-
创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。
|
41
|
+
创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。
|
46
42
|
|
47
|
-
### 配置环境变量
|
43
|
+
### 配置环境变量
|
48
44
|
|
49
|
-
<Image
|
50
|
-
alt="配置环境变量"
|
51
|
-
inStep
|
52
|
-
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
53
|
-
/>
|
45
|
+
<Image alt="配置环境变量" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
|
54
46
|
|
55
|
-
将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET`。
|
47
|
+
将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET`。
|
56
48
|
|
57
|
-
配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
|
49
|
+
配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
|
58
50
|
|
59
|
-
- `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
|
60
|
-
- `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
|
51
|
+
- `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
|
52
|
+
- `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
|
61
53
|
|
62
|
-
在部署 LobeChat 时,你需要配置以下环境变量:
|
54
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
63
55
|
|
64
|
-
| 环境变量
|
65
|
-
|
|
66
|
-
| `NEXT_AUTH_SECRET`
|
67
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。
|
68
|
-
| `AUTH_LOGTO_ID`
|
69
|
-
| `AUTH_LOGTO_SECRET`
|
70
|
-
| `AUTH_LOGTO_ISSUER`
|
71
|
-
| `NEXTAUTH_URL`
|
56
|
+
| 环境变量 | 类型 | 描述 |
|
57
|
+
| ------------------------- | -- | ------------------------------------------------------------------------------------------------ |
|
58
|
+
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
59
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。 |
|
60
|
+
| `AUTH_LOGTO_ID` | 必选 | Logto App 详情页的 Client ID |
|
61
|
+
| `AUTH_LOGTO_SECRET` | 必选 | Logto App 详情页的 Client Secret |
|
62
|
+
| `AUTH_LOGTO_ISSUER` | 必选 | Logto 提供程序的 OpenID Connect 颁发者 |
|
63
|
+
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
|
72
64
|
|
73
65
|
<Callout type={'tip'}>
|
74
66
|
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#logto) 可查阅相关变量详情。
|
75
|
-
|
76
|
-
</Callout>
|
67
|
+
</Callout>
|
77
68
|
</Steps>
|
78
69
|
|
79
70
|
### 故障排除
|
@@ -81,21 +72,21 @@ tags:
|
|
81
72
|
若你在部署 Logto 过程中遇到问题,可以参考以下常见问题:
|
82
73
|
|
83
74
|
- `Only roles with the xxx attribute may create roles`:
|
84
|
-
请检查你的数据库用户权限,确保你的 Logto 数据库中的用户具有 `admin` 角色,以便创建角色。
|
75
|
+
请检查你的数据库用户权限,确保你的 Logto 数据库中的用户具有 `admin` 角色,以便创建角色。
|
85
76
|
|
86
77
|
- 在第三方数据库例如 `Neon` 上执行`logto db seed`出错:
|
87
|
-
尝试使用`logto db seed --encrypt-base-role`命令。
|
78
|
+
尝试使用`logto db seed --encrypt-base-role`命令。
|
88
79
|
|
89
80
|
- 数据库播种失败:
|
90
|
-
请尝试使用`--skip-seed`参数跳过播种。
|
81
|
+
请尝试使用`--skip-seed`参数跳过播种。
|
91
82
|
|
92
83
|
- `Error: role xxx already exists`:
|
93
|
-
在数据库中删除已存在的角色即可。
|
84
|
+
在数据库中删除已存在的角色即可。
|
94
85
|
|
95
86
|
- 版本升级后,数据库迁移失败:
|
96
|
-
请尝试使用` npx @logto/cli db alteration deploy $version`命令(例如`npx @logto/cli db alteration deploy 1.22.0`)
|
87
|
+
请尝试使用` npx @logto/cli db alteration deploy $version`命令 (例如`npx @logto/cli db alteration deploy 1.22.0`)
|
97
88
|
|
98
89
|
- 我使用 docker 部署 希望一键升级:
|
99
|
-
在容器中执行自定义命令:`sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
|
90
|
+
在容器中执行自定义命令:`sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
|
100
91
|
|
101
92
|
<Callout type={'info'}>部署成功后,用户将可以通过 Logto 身份认证并使用 LobeChat。</Callout>
|
@@ -18,72 +18,59 @@ tags:
|
|
18
18
|
<Steps>
|
19
19
|
### Create a Microsoft Entra ID Application
|
20
20
|
|
21
|
-
In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new application.
|
21
|
+
In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new application.
|
22
22
|
|
23
|
-
Fill in the desired application name to be displayed to organizational users, choose the account types you wish to support, and if only internal users are supported, select `Accounts in this organizational directory only (Default Directory only - Single tenant)`.
|
23
|
+
Fill in the desired application name to be displayed to organizational users, choose the account types you wish to support, and if only internal users are supported, select `Accounts in this organizational directory only (Default Directory only - Single tenant)`.
|
24
24
|
|
25
|
-
In the `Redirect URI (optional)` section, for the application type, select `Web`, and in the Callback URL, enter:
|
25
|
+
In the `Redirect URI (optional)` section, for the application type, select `Web`, and in the Callback URL, enter:
|
26
26
|
|
27
|
-
```bash
|
28
|
-
https://your-domain/api/auth/callback/microsoft-entra-id
|
29
|
-
```
|
27
|
+
```bash
|
28
|
+
https://your-domain/api/auth/callback/microsoft-entra-id
|
29
|
+
```
|
30
30
|
|
31
|
-
<Callout type={'info'}>
|
32
|
-
|
33
|
-
|
34
|
-
</Callout>
|
35
|
-
|
36
|
-
<Image
|
37
|
-
alt="App Register"
|
38
|
-
inStep
|
39
|
-
src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d"
|
40
|
-
/>
|
31
|
+
<Callout type={'info'}>
|
32
|
+
- You can fill in or modify the Redirect URIs after registering, but make sure the URL you enter
|
33
|
+
matches the deployed URL. - Please replace "your-domain" with your own domain.
|
34
|
+
</Callout>
|
41
35
|
|
42
|
-
|
36
|
+
<Image alt="App Register" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d" />
|
43
37
|
|
44
|
-
|
38
|
+
Click on "Register".
|
45
39
|
|
46
|
-
|
47
|
-
alt="App Overview"
|
48
|
-
inStep
|
49
|
-
src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a"
|
50
|
-
/>
|
40
|
+
After successfully creating the application, click on the corresponding application to enter the application details page, and switch to the "Overview" tab to view the corresponding configuration information.
|
51
41
|
|
52
|
-
|
42
|
+
<Image alt="App Overview" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a" />
|
53
43
|
|
54
|
-
|
55
|
-
alt="Create App Client Secret"
|
56
|
-
inStep
|
57
|
-
src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2"
|
58
|
-
/>
|
44
|
+
Go to "Certificates & secrets", select the "Client secrets" tab, click on "New client secret", fill in the description, select the expiration time, and click on "Add" to create a new client secret.
|
59
45
|
|
60
|
-
<
|
61
|
-
Please make sure to save your client secret as this is your only chance to view it.
|
62
|
-
</Callout>
|
46
|
+
<Image alt="Create App Client Secret" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2" />
|
63
47
|
|
64
|
-
|
48
|
+
<Callout type={'important'}>
|
49
|
+
Please make sure to save your client secret as this is your only chance to view it.
|
50
|
+
</Callout>
|
65
51
|
|
66
|
-
|
52
|
+
### Add Users
|
67
53
|
|
68
|
-
|
54
|
+
Go back to the "Microsoft Entra ID" interface, enter "Users", click on "New user", fill in the user information, and click on "Create" to create a user for using LobeChat.
|
69
55
|
|
70
|
-
|
56
|
+
### Configure Environment Variables
|
71
57
|
|
72
|
-
|
73
|
-
| --- | --- | --- |
|
74
|
-
| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` |
|
75
|
-
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `microsoft-entra-id` for Microsoft Entra ID. |
|
76
|
-
| `AUTH_MICROSOFT_ENTRA_ID_ID` | Required | Client ID of the Microsoft Entra ID application. |
|
77
|
-
| `AUTH_MICROSOFT_ENTRA_ID_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
|
78
|
-
| `AUTH_MICROSOFT_ENTRA_ID_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. |
|
79
|
-
| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
58
|
+
When deploying LobeChat, you need to configure the following environment variables:
|
80
59
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
60
|
+
| Environment Variable | Type | Description |
|
61
|
+
| ----------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
62
|
+
| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` |
|
63
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `microsoft-entra-id` for Microsoft Entra ID. |
|
64
|
+
| `AUTH_MICROSOFT_ENTRA_ID_ID` | Required | Client ID of the Microsoft Entra ID application. |
|
65
|
+
| `AUTH_MICROSOFT_ENTRA_ID_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
|
66
|
+
| `AUTH_MICROSOFT_ENTRA_ID_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. |
|
67
|
+
| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` |
|
86
68
|
|
69
|
+
<Callout type={'tip'}>
|
70
|
+
You can refer to [📘 environment
|
71
|
+
variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
|
72
|
+
variables.
|
73
|
+
</Callout>
|
87
74
|
</Steps>
|
88
75
|
|
89
76
|
<Callout>
|