You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/self-hosting/advanced/authentication.mdx
+25-18
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,47 @@
1
1
---
2
-
title: >-
3
-
LobeChat Identity Verification Service - Centralized User Authorization
4
-
Management
2
+
title: LobeChat Authorization Service
5
3
description: >-
6
4
Learn about LobeChat's support for configuring external identity verification
7
5
services for centralized user authorization within enterprises/organizations.
8
6
Explore supported services like Auth0, Microsoft Entra ID, Authentik, Github,
9
7
and ZITADEL.
10
8
tags:
11
-
- Identity Verification Service
12
-
- Centralized User Authorization
13
9
- SSO Providers
14
-
- Auth0
15
-
- Microsoft Entra ID
16
-
- Authentik
17
-
- Github
18
-
- ZITADEL
10
+
- Next Auth
11
+
- Clerk
19
12
---
20
13
21
-
# Identity Verification Service
14
+
# LobeChat Authorization
22
15
23
16
LobeChat supports the configuration of external identity verification services for internal use within enterprises/organizations to centrally manage user authorization.
24
17
25
-
Currently supported identity verification services include:
18
+
## Clerk
19
+
20
+
Clerk is a comprehensive identity verification solution that has recently gained popularity. It provides a simple yet powerful API and services to handle user authentication and session management. Clerk's design philosophy is to offer a concise and modern authentication solution that enables developers to easily integrate and use it.
21
+
22
+
LobeChat has deeply integrated with Clerk to provide users with a more secure and convenient login and registration experience. It also relieves developers from the burden of managing authentication logic. Clerk's concise and modern design philosophy aligns perfectly with LobeChat's goals, making user management on the entire platform more efficient and reliable.
Click on the links to view the corresponding platform's configuration documentation.
34
41
35
42
## Advanced Configuration
36
43
37
-
To simultaneously enable multiple identity verification sources, please set the `SSO_PROVIDERS` environment variable, separating them with commas, for example, `auth0,azure-ad,authentik`.
44
+
To simultaneously enable multiple identity verification sources, please set the `NEXT_AUTH_SSO_PROVIDERS` environment variable, separating them with commas, for example, `auth0,azure-ad,authentik`.
38
45
39
46
The order corresponds to the display order of the SSO providers.
Copy file name to clipboardexpand all lines: docs/self-hosting/advanced/model-list.mdx
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ tags:
14
14
15
15
LobeChat supports customizing the model list during deployment. You can use `+` to add a model, `-` to hide a model, and use `model name=display name<extension configuration>` to customize the display name of a model, separated by English commas. The basic syntax is as follows:
Copy file name to clipboardexpand all lines: docs/self-hosting/environment-variables/auth.mdx
+48-39
Original file line number
Diff line number
Diff line change
@@ -5,150 +5,143 @@ description: >-
5
5
services in LobeChat, including OAuth SSO, NextAuth settings, and
6
6
provider-specific details.
7
7
tags:
8
-
- LobeChat
9
8
- Authentication Service
10
-
- Environment Variables
11
9
- OAuth SSO
10
+
- Clerk
12
11
- NextAuth
13
-
- Provider Details
14
12
---
15
13
16
-
##Authentication Service
14
+
# Authentication Service
17
15
18
16
LobeChat provides a complete authentication service capability when deployed. The following are the relevant environment variables. You can use these environment variables to easily define the identity verification services that need to be enabled in LobeChat.
19
17
20
-
## General Settings
18
+
## Next Auth
21
19
22
-
### `ENABLE_OAUTH_SSO`
20
+
### General Settings
23
21
24
-
- Type: Required
25
-
- Description: Enable single sign-on (SSO) for LobeChat. Set to `1` to enable single sign-on.
26
-
- Default: `-`
27
-
- Example: `1`
28
-
29
-
### `SSO_PROVIDERS`
30
-
31
-
- Type: Required
32
-
- Description: Select the single sign-on provider for LoboChat. For multiple SSO Providers separating them with commas, for example, `auth0,azure-ad,authentik`.
33
-
- Default: `auth0`
34
-
- Example: `auth0,azure-ad,authentik`
35
-
36
-
### `NEXTAUTH_SECRET`
22
+
#### `NEXTAUTH_SECRET`
37
23
38
24
- Type: Required
39
25
- Description: Key used to encrypt the session tokens in Auth.js. You can generate the key using the following command: `openssl rand -base64 32`.
- Description: This URL is used to specify the callback address for Auth.js during OAuth authentication. It does not need to be set when deploying on Vercel.
47
33
- Default: `-`
48
34
- Example: `https://example.com/api/auth`
49
35
50
-
## Auth0
36
+
#### `NEXT_AUTH_SSO_PROVIDERS`
37
+
38
+
- Type: Optional
39
+
- Description: Select the single sign-on provider for LoboChat. For multiple SSO Providers separating them with commas, for example, `auth0,azure-ad,authentik`.
40
+
- Default: `auth0`
41
+
- Example: `auth0,azure-ad,authentik`
42
+
43
+
### Auth0
51
44
52
-
### `AUTH0_CLIENT_ID`
45
+
####`AUTH0_CLIENT_ID`
53
46
54
47
- Type: Required
55
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.
56
49
- Default: `-`
57
50
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`
58
51
59
-
### `AUTH0_CLIENT_SECRET`
52
+
####`AUTH0_CLIENT_SECRET`
60
53
61
54
- Type: Required
62
55
- Description: Client Secret of the Auth0 application.
- Description: Tenant ID of the Microsoft Entra ID application.
93
86
- Default: `-`
94
87
- Example: `c8ae2f36-edf6-4cda-96b9-d3e198a47cba`
95
88
96
-
## Authentik
89
+
###Authentik
97
90
98
-
### `AUTHENTIK_CLIENT_ID`
91
+
####`AUTHENTIK_CLIENT_ID`
99
92
100
93
- Type: Required
101
94
- Description: Client ID of the Authentik provider application. You can access it [here][auth0-client-page] and navigate to the application settings to view.
102
95
- Default: `-`
103
96
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`
104
97
105
-
### `AUTHENTIK_CLIENT_SECRET`
98
+
####`AUTHENTIK_CLIENT_SECRET`
106
99
107
100
- Type: Required
108
101
- Description: Client Secret of the Authentik provider application.
- 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.
125
118
- Default: `-`
126
119
- Example: `abd94200333283550508`
127
120
128
-
### `GITHUB_CLIENT_SECRET`
121
+
####`GITHUB_CLIENT_SECRET`
129
122
130
123
- Type: Required
131
124
- Description: Client Secret of the Github application.
- 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.
@@ -160,3 +153,19 @@ LobeChat provides a complete authentication service capability when deployed. Th
160
153
providers, you can submit a [feature
161
154
request](https://github.com/lobehub/lobe-chat/issues/new/choose) or Pull Request.
162
155
</Callout>
156
+
157
+
## Clerk
158
+
159
+
### `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`
160
+
161
+
- Type: Required
162
+
- Description: Publishable key of the Clerk application. You can access it [here](https://dashboard.clerk.com) and navigate to the API Keys to view.
163
+
- Default: `-`
164
+
- Example: `pk_test_Zmxvd4luZy1wdW1hLTIyLmNsXXJrTmFjY291bnRzLmRldiQ` in dev / `pk_live_Y2xlcdsubG9iZWh1Yi1cbmMuY24k` in production
165
+
166
+
### `CLERK_SECRET_KEY`
167
+
168
+
- Type: Required
169
+
- Description: Secret key of the Clerk application.
170
+
- Default: `-`
171
+
- Example: `sk_test_513Ma0P7IAWM1XMv4waxZjRYRajWTaCfJLjpEO3SD2` in dev / `sk_live_eMMlHjwJvZFUfczFljSKqZdwQtLvmczmsJSNmdrpeZ` in production
0 commit comments