@lobehub/chat 0.142.9 → 0.144.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/.i18nrc.js +1 -0
- package/CHANGELOG.md +50 -0
- package/docs/self-hosting/advanced/authentication.mdx +3 -1
- package/docs/self-hosting/advanced/authentication.zh-CN.mdx +3 -1
- package/docs/self-hosting/advanced/sso-providers/authentik.mdx +56 -0
- package/docs/self-hosting/advanced/sso-providers/authentik.zh-CN.mdx +54 -0
- package/docs/self-hosting/environment-variables/basic.mdx +35 -8
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +34 -8
- package/locales/ar/common.json +1 -0
- package/locales/bg-BG/chat.json +120 -0
- package/locales/bg-BG/common.json +180 -0
- package/locales/bg-BG/error.json +159 -0
- package/locales/bg-BG/market.json +32 -0
- package/locales/bg-BG/migration.json +45 -0
- package/locales/bg-BG/plugin.json +166 -0
- package/locales/bg-BG/setting.json +507 -0
- package/locales/bg-BG/tool.json +9 -0
- package/locales/bg-BG/welcome.json +14 -0
- package/locales/de-DE/common.json +1 -0
- package/locales/en-US/common.json +1 -0
- package/locales/es-ES/common.json +1 -0
- package/locales/fr-FR/common.json +1 -0
- package/locales/it-IT/common.json +1 -0
- package/locales/ja-JP/common.json +1 -0
- package/locales/ko-KR/common.json +1 -0
- package/locales/nl-NL/common.json +1 -0
- package/locales/pl-PL/common.json +1 -0
- package/locales/pt-BR/common.json +1 -0
- package/locales/ru-RU/common.json +1 -0
- package/locales/tr-TR/common.json +1 -0
- package/locales/vi-VN/common.json +1 -0
- package/locales/zh-CN/common.json +1 -0
- package/locales/zh-TW/common.json +1 -0
- package/package.json +1 -1
- package/src/app/api/auth/next-auth.ts +14 -0
- package/src/config/server/app.ts +3 -0
- package/src/locales/default/common.ts +1 -0
- package/src/locales/resources.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.144.0",
|
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import NextAuth from 'next-auth';
|
|
2
2
|
import Auth0 from 'next-auth/providers/auth0';
|
|
3
|
+
import Authentik from 'next-auth/providers/authentik';
|
|
3
4
|
import AzureAd from 'next-auth/providers/azure-ad';
|
|
4
5
|
|
|
5
6
|
import { getServerConfig } from '@/config/server';
|
|
@@ -13,6 +14,9 @@ const {
|
|
|
13
14
|
AZURE_AD_CLIENT_ID,
|
|
14
15
|
AZURE_AD_CLIENT_SECRET,
|
|
15
16
|
AZURE_AD_TENANT_ID,
|
|
17
|
+
AUTHENTIK_CLIENT_ID,
|
|
18
|
+
AUTHENTIK_CLIENT_SECRET,
|
|
19
|
+
AUTHENTIK_ISSUER,
|
|
16
20
|
NEXTAUTH_SECRET,
|
|
17
21
|
} = getServerConfig();
|
|
18
22
|
|
|
@@ -65,6 +69,16 @@ const nextAuth = NextAuth({
|
|
|
65
69
|
tenantId: AZURE_AD_TENANT_ID,
|
|
66
70
|
});
|
|
67
71
|
}
|
|
72
|
+
case 'authentik': {
|
|
73
|
+
return Authentik({
|
|
74
|
+
// Specify auth scope, at least include 'openid email'
|
|
75
|
+
// all scopes in Authentik ref: https://goauthentik.io/docs/providers/oauth2
|
|
76
|
+
authorization: { params: { scope: 'openid email profile' } },
|
|
77
|
+
clientId: AUTHENTIK_CLIENT_ID,
|
|
78
|
+
clientSecret: AUTHENTIK_CLIENT_SECRET,
|
|
79
|
+
issuer: AUTHENTIK_ISSUER,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
68
82
|
default: {
|
|
69
83
|
throw new Error(`[NextAuth] provider ${provider} is not supported`);
|
|
70
84
|
}
|
package/src/config/server/app.ts
CHANGED
|
@@ -65,6 +65,9 @@ export const getAppConfig = () => {
|
|
|
65
65
|
AZURE_AD_CLIENT_ID: process.env.AZURE_AD_CLIENT_ID || '',
|
|
66
66
|
AZURE_AD_CLIENT_SECRET: process.env.AZURE_AD_CLIENT_SECRET || '',
|
|
67
67
|
AZURE_AD_TENANT_ID: process.env.AZURE_AD_TENANT_ID || '',
|
|
68
|
+
AUTHENTIK_CLIENT_ID: process.env.AUTHENTIK_CLIENT_ID || '',
|
|
69
|
+
AUTHENTIK_CLIENT_SECRET: process.env.AUTHENTIK_CLIENT_SECRET || '',
|
|
70
|
+
AUTHENTIK_ISSUER: process.env.AUTHENTIK_ISSUER || '',
|
|
68
71
|
NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET || '',
|
|
69
72
|
|
|
70
73
|
ENABLE_LANGFUSE: process.env.ENABLE_LANGFUSE === '1',
|
package/src/locales/resources.ts
CHANGED
|
@@ -2,6 +2,7 @@ import resources from './default';
|
|
|
2
2
|
|
|
3
3
|
export const locales = [
|
|
4
4
|
'ar',
|
|
5
|
+
'bg-BG',
|
|
5
6
|
'de-DE',
|
|
6
7
|
'en-US',
|
|
7
8
|
'es-ES',
|
|
@@ -112,6 +113,10 @@ export const localeOptions: LocaleOptions = [
|
|
|
112
113
|
label: 'Tiếng Việt',
|
|
113
114
|
value: 'vi-VN',
|
|
114
115
|
},
|
|
116
|
+
{
|
|
117
|
+
label: 'Български',
|
|
118
|
+
value: 'bg-BG',
|
|
119
|
+
},
|
|
115
120
|
] as LocaleOptions;
|
|
116
121
|
|
|
117
122
|
export const supportLocales: string[] = [...locales, 'en', 'zh'];
|