@lobehub/chat 1.22.1 → 1.22.3
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/CHANGELOG.md +50 -0
- package/docker-compose/local/docker-compose.yml +11 -9
- package/docker-compose/{local-logto → local/logto}/.env.example +2 -2
- package/docker-compose/{local-logto → local/logto}/.env.zh-CN.example +3 -3
- package/docker-compose/{local-logto → local/logto}/docker-compose.yml +8 -7
- package/docker-compose/local/setup.sh +31 -29
- package/docker-compose/local/zitadel/docker-compose.yml +8 -8
- package/docker-compose/production/{.env.example → logto/.env.example} +3 -3
- package/docker-compose/production/{.env.zh-CN.example → logto/.env.zh-CN.example} +3 -3
- package/docker-compose/production/{docker-compose.yml → logto/docker-compose.yml} +2 -1
- package/docker-compose/production/zitadel/docker-compose.yml +5 -5
- package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +2 -2
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +120 -0
- package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +121 -0
- package/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx +3 -3
- package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +10 -8
- package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/auth.mdx +5 -1
- package/docs/self-hosting/advanced/auth.zh-CN.mdx +5 -1
- package/docs/self-hosting/environment-variables/auth.mdx +88 -63
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +91 -68
- package/docs/self-hosting/server-database/docker-compose.mdx +163 -280
- package/docs/self-hosting/server-database/docker-compose.zh-CN.mdx +92 -210
- package/docs/usage/providers/ai21.mdx +3 -1
- package/docs/usage/providers/ai360.mdx +1 -1
- package/docs/usage/providers/fireworksai.mdx +3 -1
- package/docs/usage/providers/github.mdx +1 -1
- package/docs/usage/providers/hunyuan.mdx +3 -1
- package/docs/usage/providers/siliconcloud.mdx +3 -1
- package/docs/usage/providers/spark.mdx +1 -1
- package/docs/usage/providers/upstage.mdx +1 -1
- package/docs/usage/providers/wenxin.mdx +3 -1
- package/docs/usage/providers/zeroone.mdx +2 -2
- package/package.json +5 -5
- package/src/libs/next-auth/sso-providers/logto.ts +1 -1
- package/src/server/manifest.ts +0 -3
@@ -0,0 +1,121 @@
|
|
1
|
+
---
|
2
|
+
title: 在 LobeChat 中配置 Casdoor 身份验证服务
|
3
|
+
description: 学习如何在 LobeChat 中配置 Casdoor 身份验证服务,包括部署、创建、设置权限和环境变量。
|
4
|
+
tags:
|
5
|
+
- Casdoor 身份验证
|
6
|
+
- 环境变量配置
|
7
|
+
- 单点登录
|
8
|
+
- LobeChat
|
9
|
+
---
|
10
|
+
|
11
|
+
# 配置 Casdoor 身份验证服务
|
12
|
+
|
13
|
+
[Casdoor](https://github.com/casdoor/casdoor) 是一个开源的身份验证服务,功能配置丰富且易于上手。
|
14
|
+
|
15
|
+
<Callout type={'tip'}>
|
16
|
+
若你想要私有部署 Casdoor,我们建议你将之与 LobeChat 数据库版本一同使用 Docker Compose 部署,此时
|
17
|
+
LobeChat 可以与之共用同一个 Postgres 实例。
|
18
|
+
</Callout>
|
19
|
+
|
20
|
+
## Casdoor 配置流程
|
21
|
+
|
22
|
+
若你使用局域网 IP 部署,下文假设:
|
23
|
+
|
24
|
+
- 你的 LobeChat 数据库版本 IP / 端口为 `http://LOBECHAT_IP:3210`。
|
25
|
+
- 你私有部署 Casdoor,其域名为 `http://CASDOOR_IP:8000`。
|
26
|
+
|
27
|
+
若你使用公网部署,下文假设:
|
28
|
+
|
29
|
+
- 你的 LobeChat 数据库版本域名为 `https://lobe.example.com`。
|
30
|
+
- 你私有部署 Casdoor,其域名为 `https://lobe-auth-api.example.com`。
|
31
|
+
|
32
|
+
<Steps>
|
33
|
+
### 创建 Casdoor 应用
|
34
|
+
|
35
|
+
访问你私有部署的 Casdoor WebUI(默认为 `http://localhost:8000/`) 进入控制台,默认账号为 `admin`,密码为 `123`。
|
36
|
+
|
37
|
+
前往 `身份认证` -> `应用`,创建一个 `LobeChat` 应用或直接修改内置的 `built-in` 应用,其他字段可以自行探索,但你至少需要配置以下字段:
|
38
|
+
|
39
|
+
- 名称、显示名称:`LobeChat`
|
40
|
+
- 重定向 URLs:
|
41
|
+
- 本地开发环境:`http://localhost:3210/api/auth/callback/casdoor`
|
42
|
+
- 局域网 IP 部署:`http://LOBECHAT_IP:3210/api/auth/callback/casdoor`
|
43
|
+
- 公网环境:`https://lobe.example.com/api/auth/callback/casdoor`
|
44
|
+
|
45
|
+
还有一些不必需但是可以提高用户体验的字段:
|
46
|
+
|
47
|
+
- Logo:`https://lobehub.com/icon-192x192.png`
|
48
|
+
- 表单 CSS、表单 CSS(移动端):
|
49
|
+
|
50
|
+
```html
|
51
|
+
<style>
|
52
|
+
.login-panel {
|
53
|
+
padding: 40px 70px 0 70px;
|
54
|
+
border-radius: 10px;
|
55
|
+
background-color: #ffffff;
|
56
|
+
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
57
|
+
}
|
58
|
+
.panel-logo {
|
59
|
+
width: 64px;
|
60
|
+
}
|
61
|
+
.login-logo-box {
|
62
|
+
margin-top: 20px;
|
63
|
+
}
|
64
|
+
|
65
|
+
#parent-area
|
66
|
+
> main
|
67
|
+
> div
|
68
|
+
> div.login-content
|
69
|
+
> div.login-panel
|
70
|
+
> div.login-form
|
71
|
+
> div
|
72
|
+
> div
|
73
|
+
> button {
|
74
|
+
box-shadow: none !important;
|
75
|
+
border-radius: 10px !important;
|
76
|
+
transition-property: all;
|
77
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
78
|
+
transition-duration: 150ms;
|
79
|
+
border: 1px solid #eee !important;
|
80
|
+
}
|
81
|
+
|
82
|
+
@media (max-width: 640px) {
|
83
|
+
.login-panel {
|
84
|
+
padding: 40px 0 0 0;
|
85
|
+
box-shadow: none;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
</style>
|
90
|
+
```
|
91
|
+
|
92
|
+
随后,复制 `客户端 ID` 和 `客户端密钥`,并保存。
|
93
|
+
|
94
|
+
### 配置环境变量
|
95
|
+
|
96
|
+
将获取到的 `客户端 ID` 和 `客户端`,设为 LobeChat 环境变量中的 `AUTH_CASDOOR_ID` 和 `AUTH_CASDOOR_SECRET`。
|
97
|
+
|
98
|
+
配置 LobeChat 环境变量中 `AUTH_CASDOOR_ISSUER` 为:
|
99
|
+
|
100
|
+
- `http://localhost:8000/`,若你是本地开发环境
|
101
|
+
- `http://CASDOOR_IP:8000/`,若你是局域网私有部署的 Casdoor
|
102
|
+
- `https://lobe-auth-api.example.com/`,若你是公网环境部署的 Casdoor
|
103
|
+
|
104
|
+
在部署 LobeChat 时,你需要配置以下环境变量:
|
105
|
+
|
106
|
+
| 环境变量 | 类型 | 描述 |
|
107
|
+
| --- | --- | --- |
|
108
|
+
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
109
|
+
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Casdoor 请填写 `casdoor`。 |
|
110
|
+
| `AUTH_CASDOOR_ID` | 必选 | Casdoor 应用详情页的客户端 ID |
|
111
|
+
| `AUTH_CASDOOR_SECRET` | 必选 | Casdoor 应用详情页的客户端密钥 |
|
112
|
+
| `AUTH_CASDOOR_ISSUER` | 必选 | Casdoor 提供程序的 OpenID Connect 颁发者。 |
|
113
|
+
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
|
114
|
+
|
115
|
+
<Callout type={'tip'}>
|
116
|
+
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#casdoor) 可查阅相关变量详情。
|
117
|
+
|
118
|
+
</Callout>
|
119
|
+
</Steps>
|
120
|
+
|
121
|
+
<Callout type={'info'}>部署成功后,用户将可以通过 Casdoor 身份认证并使用 LobeChat。</Callout>
|
@@ -49,9 +49,9 @@ tags:
|
|
49
49
|
| --- | --- | --- |
|
50
50
|
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
51
51
|
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Cloudflare Zero Trust 请填写 `cloudflare-zero-trust`。 |
|
52
|
-
| `
|
53
|
-
| `
|
54
|
-
| `
|
52
|
+
| `AUTH_CLOUDFLARE_ZERO_TRUST_CLIENT_ID` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client ID`,示例值是 `lobe-chat` |
|
53
|
+
| `AUTH_CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client secret`,示例值是 `insecure_secret` |
|
54
|
+
| `AUTH_CLOUDFLARE_ZERO_TRUST_ISSUER` | 必选 | 在 Cloudflare Zero Trust 生成的 `Issuer`,例如 `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/7db0f` |
|
55
55
|
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
56
56
|
|
57
57
|
<Callout type={'tip'}>
|
@@ -15,9 +15,9 @@ tags:
|
|
15
15
|
[Logto](https://github.com/logto-io/logto) is an open-source authentication service with a simple and beautiful interface, rich in features and easy to use. You can choose to use the official Logto Cloud or opt for a private deployment of Logto.
|
16
16
|
|
17
17
|
<Callout type={'tip'}>
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
If you want to deploy Logto privately, we recommend using Docker Compose to deploy it together
|
19
|
+
with the LobeChat database version. In this case, LobeChat can share the same Postgres instance
|
20
|
+
with it.
|
21
21
|
</Callout>
|
22
22
|
|
23
23
|
## Logto Configuration Process
|
@@ -49,7 +49,7 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log
|
|
49
49
|
|
50
50
|
Set the obtained `Client ID` and `Client Secret` as `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET` in the LobeChat environment variables.
|
51
51
|
|
52
|
-
Configure `
|
52
|
+
Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
|
53
53
|
|
54
54
|
- `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
|
55
55
|
- `https://example.logto.app/oidc` if you are using Logto Cloud
|
@@ -60,9 +60,9 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log
|
|
60
60
|
| ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
61
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
62
|
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
|
63
|
-
| `AUTH_LOGTO_ID`
|
64
|
-
| `AUTH_LOGTO_SECRET`
|
65
|
-
| `AUTH_LOGTO_ISSUER`
|
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
66
|
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
|
67
67
|
|
68
68
|
<Callout type={'tip'}>
|
@@ -71,4 +71,6 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log
|
|
71
71
|
</Callout>
|
72
72
|
</Steps>
|
73
73
|
|
74
|
-
<Callout type={'info'}>
|
74
|
+
<Callout type={'info'}>
|
75
|
+
After successful deployment, users will be able to authenticate via Logto and use LobeChat.
|
76
|
+
</Callout>
|
@@ -53,7 +53,7 @@ tags:
|
|
53
53
|
|
54
54
|
将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `LOGTO_CLIENT_ID` 和 `LOGTO_CLIENT_SECRET`。
|
55
55
|
|
56
|
-
配置 LobeChat 环境变量中 `
|
56
|
+
配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
|
57
57
|
|
58
58
|
- `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
|
59
59
|
- `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
|
@@ -63,9 +63,13 @@ The order corresponds to the display order of the SSO providers.
|
|
63
63
|
| SSO Provider | Value |
|
64
64
|
| ------------------ | ----------- |
|
65
65
|
| Auth0 | `auth0` |
|
66
|
-
|
|
66
|
+
| Authenlia | `authenlia` |
|
67
67
|
| Authentik | `authentik` |
|
68
|
+
| Casdoor | `casdoor` |
|
69
|
+
| Cloudflare Zero Trust | `cloudflare-zero-trust` |
|
68
70
|
| Github | `github` |
|
71
|
+
| Logto | `logto` |
|
72
|
+
| Microsoft Entra ID | `azure-ad` |
|
69
73
|
| ZITADEL | `zitadel` |
|
70
74
|
|
71
75
|
## Other SSO Providers
|
@@ -60,9 +60,13 @@ LobeChat 与 Clerk 做了深度集成,能够为用户提供一个更加安全
|
|
60
60
|
| SSO 提供商 | 值 |
|
61
61
|
| ------------------ | ----------- |
|
62
62
|
| Auth0 | `auth0` |
|
63
|
-
|
|
63
|
+
| Authenlia | `authenlia` |
|
64
64
|
| Authentik | `authentik` |
|
65
|
+
| Casdoor | `casdoor` |
|
66
|
+
| Cloudflare Zero Trust | `cloudflare-zero-trust` |
|
65
67
|
| Github | `github` |
|
68
|
+
| Logto | `logto` |
|
69
|
+
| Microsoft Entra ID | `azure-ad` |
|
66
70
|
| ZITADEL | `zitadel` |
|
67
71
|
|
68
72
|
## 其他 SSO 提供商
|
@@ -42,201 +42,226 @@ LobeChat provides a complete authentication service capability when deployed. Th
|
|
42
42
|
|
43
43
|
### Auth0
|
44
44
|
|
45
|
-
#### `
|
45
|
+
#### `AUTH_AUTH_AUTH0_CLIENT_ID`
|
46
46
|
|
47
47
|
- Type: Required
|
48
48
|
- Description: Client ID of the Auth0 application. You can access it [here](https://manage.auth0.com/dashboard) and navigate to the application settings to view.
|
49
49
|
- Default: `-`
|
50
50
|
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`
|
51
51
|
|
52
|
-
#### `
|
52
|
+
#### `AUTH_AUTH0_CLIENT_SECRET`
|
53
53
|
|
54
54
|
- Type: Required
|
55
55
|
- Description: Client Secret of the Auth0 application.
|
56
56
|
- Default: `-`
|
57
57
|
- Example: `wnX7UbZg85ZUzF6ioxPLnJVEQa1Elbs7aqBUSF16xleBS5AdkVfASS49-fQIC8Rm`
|
58
58
|
|
59
|
-
#### `
|
59
|
+
#### `AUTH_AUTH0_ISSUER`
|
60
60
|
|
61
61
|
- Type: Required
|
62
62
|
- Description: Issuer/domain of the Auth0 application.
|
63
63
|
- Default: `-`
|
64
64
|
- Example: `https://example.auth0.com`
|
65
65
|
|
66
|
-
###
|
66
|
+
### Authelia
|
67
67
|
|
68
|
-
#### `
|
68
|
+
#### `AUTH_AUTHELIA_CLIENT_ID`
|
69
69
|
|
70
70
|
- Type: Required
|
71
|
-
- Description: Client ID of the
|
71
|
+
- Description: Client ID of the Authelia provider application.
|
72
72
|
- Default: `-`
|
73
|
-
- Example: `
|
73
|
+
- Example: `lobe-chat`
|
74
74
|
|
75
|
-
#### `
|
75
|
+
#### `AUTH_AUTHELIA_CLIENT_SECRET`
|
76
76
|
|
77
77
|
- Type: Required
|
78
|
-
- Description:
|
78
|
+
- Description: The plaintext of the Client Secret for the Authelia provider
|
79
79
|
- Default: `-`
|
80
|
-
- Example:
|
80
|
+
- Example: `insecure_secret`
|
81
81
|
|
82
|
-
#### `
|
82
|
+
#### `AUTH_AUTHELIA_ISSUER`
|
83
83
|
|
84
84
|
- Type: Required
|
85
|
-
- Description:
|
85
|
+
- Description: Issuer of the Authelia provider application.
|
86
86
|
- Default: `-`
|
87
|
-
- Example: `
|
87
|
+
- Example: `https://sso.example.com`
|
88
88
|
|
89
89
|
### Authentik
|
90
90
|
|
91
|
-
#### `
|
91
|
+
#### `AUTH_AUTHENTIK_CLIENT_ID`
|
92
92
|
|
93
93
|
- Type: Required
|
94
|
-
- Description: Client ID of the Authentik provider application.
|
94
|
+
- Description: Client ID of the Authentik provider application.
|
95
95
|
- Default: `-`
|
96
96
|
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`
|
97
97
|
|
98
|
-
#### `
|
98
|
+
#### `AUTH_AUTHENTIK_CLIENT_SECRET`
|
99
99
|
|
100
100
|
- Type: Required
|
101
101
|
- Description: Client Secret of the Authentik provider application.
|
102
102
|
- Default: `-`
|
103
103
|
- Example: `wnX7UbZg85ZUzF6ioxPLnJVEQa1Elbs7aqBUSF16xleBS5AdkVfASS49-fQIC8Rm`
|
104
104
|
|
105
|
-
#### `
|
105
|
+
#### `AUTH_AUTHENTIK_ISSUER`
|
106
106
|
|
107
107
|
- Type: Required
|
108
108
|
- Description: Issuer/domain of the Authentik provider application.
|
109
109
|
- Default: `-`
|
110
110
|
- Example: `https://your-authentik-domain.com/application/o/slug/`
|
111
111
|
|
112
|
-
###
|
112
|
+
### Casdoor
|
113
113
|
|
114
|
-
#### `
|
114
|
+
#### `AUTH_CASDOOR_CLIENT_ID`
|
115
115
|
|
116
116
|
- Type: Required
|
117
|
-
- Description: Client ID
|
117
|
+
- Description: Client ID provided by Casdoor
|
118
118
|
- Default: `-`
|
119
|
-
- Example: `
|
119
|
+
- Example: `570bfa85a21800a25198`
|
120
120
|
|
121
|
-
#### `
|
121
|
+
#### `AUTH_CASDOOR_CLIENT_SECRET`
|
122
122
|
|
123
123
|
- Type: Required
|
124
|
-
- Description:
|
124
|
+
- Description: Plaintext Client Secret provided by Casdoor
|
125
125
|
- Default: `-`
|
126
|
-
- Example: `
|
126
|
+
- Example: `233a623a15eac2db2e43bb8a323eda729552c405`
|
127
127
|
|
128
|
-
#### `
|
128
|
+
#### `AUTH_CASDOOR_ISSUER`
|
129
129
|
|
130
130
|
- Type: Required
|
131
|
-
- Description:
|
131
|
+
- Description: OpenID Connect issuer provided by Casdoor
|
132
132
|
- Default: `-`
|
133
|
-
- Example: `https://
|
133
|
+
- Example: `https://lobe-auth-api.example.com/`
|
134
134
|
|
135
135
|
### Cloudflare Zero Trust
|
136
136
|
|
137
|
-
#### `
|
137
|
+
#### `AUTH_CLOUDFLARE_ZERO_TRUST_CLIENT_ID`
|
138
138
|
|
139
139
|
- Type: Required
|
140
140
|
- Description: Client ID of the Cloudflare Zero Trust provider application.
|
141
141
|
- Default: `-`
|
142
142
|
- Example: `711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c`
|
143
143
|
|
144
|
-
#### `
|
144
|
+
#### `AUTH_CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET`
|
145
145
|
|
146
146
|
- Type: Required
|
147
147
|
- Description: The plaintext of the Client Secret for the Cloudflare Zero Trust provider
|
148
148
|
- Default: `-`
|
149
149
|
- Example: `8f26d4ef834a828045b401e032ae128dbb00471bca53f0d25332323f525dfa30`
|
150
150
|
|
151
|
-
#### `
|
151
|
+
#### `AUTH_CLOUDFLARE_ZERO_TRUST_ISSUER`
|
152
152
|
|
153
153
|
- Type: Required
|
154
154
|
- Description: Issuer of the Cloudflare Zero Trust provider application.
|
155
155
|
- Default: `-`
|
156
156
|
- Example: `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c`
|
157
157
|
|
158
|
-
###
|
158
|
+
### Github
|
159
159
|
|
160
|
-
#### `
|
160
|
+
#### `AUTH_GITHUB_CLIENT_ID`
|
161
161
|
|
162
162
|
- Type: Required
|
163
|
-
- Description: Client ID of the
|
163
|
+
- Description: Client ID of the Github application. You can access it [here](https://github.com/settings/apps) and navigate to the application settings to view.
|
164
164
|
- Default: `-`
|
165
|
-
- Example: `
|
165
|
+
- Example: `abd94200333283550508`
|
166
166
|
|
167
|
-
#### `
|
167
|
+
#### `AUTH_GITHUB_CLIENT_SECRET`
|
168
168
|
|
169
169
|
- Type: Required
|
170
|
-
- Description:
|
170
|
+
- Description: Client Secret of the Github application.
|
171
171
|
- Default: `-`
|
172
|
-
- Example: `
|
172
|
+
- Example: `dd262976ac0931d947e104891586a053f3d3750b`
|
173
173
|
|
174
|
-
|
174
|
+
### Logto
|
175
|
+
|
176
|
+
#### `AUTH_LOGTO_CLIENT_ID`
|
175
177
|
|
176
178
|
- Type: Required
|
177
|
-
- Description:
|
178
|
-
- Default: `-`
|
179
|
-
- Example: `
|
179
|
+
- Description: The Client ID of the Logto application. You can find it in the Logto console for private deployment or [Logto Cloud](http://cloud.logto.io/) depending on the deployment mode.
|
180
|
+
- Default value: `-`
|
181
|
+
- Example: `123456789012345678@your-project`
|
180
182
|
|
181
|
-
|
183
|
+
#### `AUTH_LOGTO_CLIENT_SECRET`
|
184
|
+
|
185
|
+
- Type: Required
|
186
|
+
- Description: The Client Secret of the Logto application.
|
187
|
+
- Default value: `-`
|
188
|
+
- Example: `9QF1n5ATzU7Z3mHp2Iw4gKX8kY6oR7uW1DnKcV3LqX2jF6iG3fBmJ1kV7nS5zE6A`
|
182
189
|
|
183
|
-
#### `
|
190
|
+
#### `AUTH_LOGTO_ISSUER`
|
184
191
|
|
185
192
|
- Type: Required
|
186
|
-
- Description:
|
193
|
+
- Description: The OpenID Connect issuer of the Logto application. You can find it in the Logto console for private deployment or [Logto Cloud](http://cloud.logto.io/) depending on the deployment mode.
|
194
|
+
- Default value: `-`
|
195
|
+
- Example: `https://lobe-auth-api.example.com/oidc`
|
196
|
+
|
197
|
+
### Microsoft Entra ID
|
198
|
+
|
199
|
+
#### `AUTH_AZURE_AD_CLIENT_ID`
|
200
|
+
|
201
|
+
- Type: Required
|
202
|
+
- Description: Client ID of the Microsoft Entra ID application.
|
187
203
|
- Default: `-`
|
188
|
-
- Example: `
|
204
|
+
- Example: `be8f6da1-58c3-4f16-ff1b-78f5148e10df`
|
189
205
|
|
190
|
-
#### `
|
206
|
+
#### `AUTH_AZURE_AD_CLIENT_SECRET`
|
191
207
|
|
192
208
|
- Type: Required
|
193
|
-
- Description: Client Secret of the
|
209
|
+
- Description: Client Secret of the Microsoft Entra ID application.
|
194
210
|
- Default: `-`
|
195
|
-
- Example: `
|
211
|
+
- Example: `~gI8Q.pTiN1vwB6Gl.E1yFT1ojcXABkdACfJXaNj`
|
212
|
+
|
213
|
+
#### `AUTH_AZURE_AD_TENANT_ID`
|
214
|
+
|
215
|
+
- Type: Required
|
216
|
+
- Description: Tenant ID of the Microsoft Entra ID application.
|
217
|
+
- Default: `-`
|
218
|
+
- Example: `c8ae2f36-edf6-4cda-96b9-d3e198a47cba`
|
196
219
|
|
197
220
|
### ZITADEL
|
198
221
|
|
199
|
-
#### `
|
222
|
+
#### `AUTH_ZITADEL_CLIENT_ID`
|
200
223
|
|
201
224
|
- Type: Required
|
202
225
|
- Description: Client ID of the ZITADEL application. This can be found under your application in the ZITADEL console.
|
203
226
|
- Default: `-`
|
204
227
|
- Example: `123456789012345678@your-project`
|
205
228
|
|
206
|
-
#### `
|
229
|
+
#### `AUTH_ZITADEL_CLIENT_SECRET`
|
207
230
|
|
208
231
|
- Type: Required
|
209
232
|
- Description: Client Secret of the ZITADEL application.
|
210
233
|
- Default: `-`
|
211
234
|
- Example: `9QF1n5ATzU7Z3mHp2Iw4gKX8kY6oR7uW1DnKcV3LqX2jF6iG3fBmJ1kV7nS5zE6A`
|
212
235
|
|
213
|
-
#### `
|
236
|
+
#### `AUTH_ZITADEL_ISSUER`
|
214
237
|
|
215
238
|
- Type: Required
|
216
239
|
- Description: Issuer of the ZITADEL application. This is usually the URL of the ZITADEL instance, and can be found in `URLs` tab of your application in the console.
|
217
240
|
- Default: `-`
|
218
241
|
- Example: `https://your-instance-abc123.zitadel.cloud`
|
219
242
|
|
220
|
-
|
243
|
+
### Generic OIDC
|
244
|
+
|
245
|
+
#### `GENERIC_OIDC_CLIENT_ID`
|
221
246
|
|
222
247
|
- Type: Required
|
223
|
-
- Description:
|
224
|
-
- Default
|
225
|
-
- Example: `
|
248
|
+
- Description: Client ID of the Generic OIDC provider application.
|
249
|
+
- Default: `-`
|
250
|
+
- Example: `_client_id_for_lobe_chat_`
|
226
251
|
|
227
|
-
#### `
|
252
|
+
#### `GENERIC_OIDC_CLIENT_SECRET`
|
228
253
|
|
229
254
|
- Type: Required
|
230
|
-
- Description: The Client Secret
|
231
|
-
- Default
|
232
|
-
- Example: `
|
255
|
+
- Description: The plaintext of the Client Secret for the Generic OIDC provider
|
256
|
+
- Default: `-`
|
257
|
+
- Example: `_client_secret_for_lobe_chat_`
|
233
258
|
|
234
|
-
#### `
|
259
|
+
#### `GENERIC_OIDC_ISSUER`
|
235
260
|
|
236
261
|
- Type: Required
|
237
|
-
- Description:
|
238
|
-
- Default
|
239
|
-
- Example: `https://
|
262
|
+
- Description: Issuer of the Generic OIDC provider application.
|
263
|
+
- Default: `-`
|
264
|
+
- Example: `https://sso.example.com`
|
240
265
|
|
241
266
|
<Callout>
|
242
267
|
Currently, we only support providers above. If you need to use other identity verification service
|