Skip to content

Commit

Permalink
📝docs: align variable names (lobehub#4369)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuozhiyongde authored Oct 14, 2024
1 parent 04b58f8 commit 2820697
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ OPENAI_API_KEY=sk-xxxxxxxxx
# NEXT_AUTH_SECRET=

# Auth0 configurations
# AUTH0_CLIENT_ID=
# AUTH0_CLIENT_SECRET=
# AUTH0_ISSUER=https://your-domain.auth0.com
# AUTH_AUTH0_ID=
# AUTH_AUTH0_SECRET=
# AUTH_AUTH0_ISSUER=https://your-domain.auth0.com

########################################
########## Server Database #############
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/local/logto/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Logto secret
AUTH_LOGTO_CLIENT_ID=
AUTH_LOGTO_CLIENT_SECRET=
AUTH_LOGTO_ID=
AUTH_LOGTO_SECRET=
AUTH_LOGTO_ISSUER=

# MinIO S3 configuration
MINIO_ROOT_USER=YOUR_MINIO_USER
Expand Down
5 changes: 3 additions & 2 deletions docker-compose/local/logto/.env.zh-CN.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Logto 鉴权相关
AUTH_LOGTO_CLIENT_ID=
AUTH_LOGTO_CLIENT_SECRET=
AUTH_LOGTO_ID=
AUTH_LOGTO_SECRET=
AUTH_LOGTO_ISSUER=

# MinIO S3 配置
MINIO_ROOT_USER=YOUR_MINIO_USER
Expand Down
4 changes: 2 additions & 2 deletions docker-compose/production/logto/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ NEXTAUTH_URL=https://lobe.example.com/api/auth

# NextAuth providers configuration (example using Logto)
# For other providers, see: https://lobehub.com/docs/self-hosting/environment-variables/auth
AUTH_LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID
AUTH_LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET
AUTH_LOGTO_ID=YOUR_LOGTO_ID
AUTH_LOGTO_SECRET=YOUR_LOGTO_SECRET
AUTH_LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc

# Proxy settings (if needed, e.g., when using GitHub as an auth provider)
Expand Down
4 changes: 2 additions & 2 deletions docker-compose/production/logto/.env.zh-CN.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ NEXTAUTH_URL=https://lobe.example.com/api/auth

# NextAuth 鉴权服务提供商部分,以 Logto 为例
# 其他鉴权服务提供商所需的环境变量,请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/auth
AUTH_LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID
AUTH_LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET
AUTH_LOGTO_ID=YOUR_LOGTO_ID
AUTH_LOGTO_SECRET=YOUR_LOGTO_SECRET
AUTH_LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc

# 代理相关,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ tags:

至此您已成功在 Clouflare Zero Trust 中创建了一个名为 `LobeChat SSO` 的 SaaS 应用。

接下来我们需要在 `Redirect URLs` 中填入 `https://chat.example.com/api/auth/callback/cloudflare-zero-trust`(注意此处的 `chat.example.com` 需要替换为您的实例地址)
![image](https://github.com/user-attachments/assets/433fdce4-0af5-417f-b80d-163c2d4f02f6)
接下来我们需要在 `Redirect URLs` 中填入 `https://chat.example.com/api/auth/callback/cloudflare-zero-trust`(注意此处的 `chat.example.com` 需要替换为您的实例地址) ![image](https://github.com/user-attachments/assets/433fdce4-0af5-417f-b80d-163c2d4f02f6)

最后我们将页面往下滚动,您将需要记录以下三个值 `Client secret`, `Client ID``Issuer` 以备后续部署 LobeChat 环境变量使用。

Expand Down
2 changes: 1 addition & 1 deletion docs/self-hosting/advanced/auth/next-auth/logto.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log

<Image alt="Configure Environment Variables" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />

Set the obtained `Client ID` and `Client Secret` as `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET` in the LobeChat environment variables.
Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.

Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:

Expand Down
2 changes: 1 addition & 1 deletion docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tags:
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
/>

将获取到的 `Client ID``Client Secret`,设为 LobeChat 环境变量中的 `LOGTO_CLIENT_ID``LOGTO_CLIENT_SECRET`
将获取到的 `Client ID``Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID``AUTH_LOGTO_SECRET`

配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:

Expand Down
42 changes: 21 additions & 21 deletions docs/self-hosting/environment-variables/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Auth0

#### `AUTH_AUTH_AUTH0_CLIENT_ID`
#### `AUTH_AUTH0_ID`

- Type: Required
- 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.
- Default: `-`
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`

#### `AUTH_AUTH0_CLIENT_SECRET`
#### `AUTH_AUTH0_SECRET`

- Type: Required
- Description: Client Secret of the Auth0 application.
Expand All @@ -65,14 +65,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Authelia

#### `AUTH_AUTHELIA_CLIENT_ID`
#### `AUTH_AUTHELIA_ID`

- Type: Required
- Description: Client ID of the Authelia provider application.
- Default: `-`
- Example: `lobe-chat`

#### `AUTH_AUTHELIA_CLIENT_SECRET`
#### `AUTH_AUTHELIA_SECRET`

- Type: Required
- Description: The plaintext of the Client Secret for the Authelia provider
Expand All @@ -88,14 +88,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Authentik

#### `AUTH_AUTHENTIK_CLIENT_ID`
#### `AUTH_AUTHENTIK_ID`

- Type: Required
- Description: Client ID of the Authentik provider application.
- Default: `-`
- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P`

#### `AUTH_AUTHENTIK_CLIENT_SECRET`
#### `AUTH_AUTHENTIK_SECRET`

- Type: Required
- Description: Client Secret of the Authentik provider application.
Expand All @@ -111,14 +111,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Casdoor

#### `AUTH_CASDOOR_CLIENT_ID`
#### `AUTH_CASDOOR_ID`

- Type: Required
- Description: Client ID provided by Casdoor
- Default: `-`
- Example: `570bfa85a21800a25198`

#### `AUTH_CASDOOR_CLIENT_SECRET`
#### `AUTH_CASDOOR_SECRET`

- Type: Required
- Description: Plaintext Client Secret provided by Casdoor
Expand All @@ -134,14 +134,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Cloudflare Zero Trust

#### `AUTH_CLOUDFLARE_ZERO_TRUST_CLIENT_ID`
#### `AUTH_CLOUDFLARE_ZERO_TRUST_ID`

- Type: Required
- Description: Client ID of the Cloudflare Zero Trust provider application.
- Default: `-`
- Example: `711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c`

#### `AUTH_CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET`
#### `AUTH_CLOUDFLARE_ZERO_TRUST_SECRET`

- Type: Required
- Description: The plaintext of the Client Secret for the Cloudflare Zero Trust provider
Expand All @@ -157,14 +157,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Github

#### `AUTH_GITHUB_CLIENT_ID`
#### `AUTH_GITHUB_ID`

- Type: Required
- 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.
- Default: `-`
- Example: `abd94200333283550508`

#### `AUTH_GITHUB_CLIENT_SECRET`
#### `AUTH_GITHUB_SECRET`

- Type: Required
- Description: Client Secret of the Github application.
Expand All @@ -173,14 +173,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Logto

#### `AUTH_LOGTO_CLIENT_ID`
#### `AUTH_LOGTO_ID`

- Type: Required
- 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.
- Default value: `-`
- Example: `123456789012345678@your-project`

#### `AUTH_LOGTO_CLIENT_SECRET`
#### `AUTH_LOGTO_SECRET`

- Type: Required
- Description: The Client Secret of the Logto application.
Expand All @@ -196,14 +196,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Microsoft Entra ID

#### `AUTH_AZURE_AD_CLIENT_ID`
#### `AUTH_AZURE_AD_ID`

- Type: Required
- Description: Client ID of the Microsoft Entra ID application.
- Default: `-`
- Example: `be8f6da1-58c3-4f16-ff1b-78f5148e10df`

#### `AUTH_AZURE_AD_CLIENT_SECRET`
#### `AUTH_AZURE_AD_SECRET`

- Type: Required
- Description: Client Secret of the Microsoft Entra ID application.
Expand All @@ -219,14 +219,14 @@ LobeChat provides a complete authentication service capability when deployed. Th

### ZITADEL

#### `AUTH_ZITADEL_CLIENT_ID`
#### `AUTH_ZITADEL_ID`

- Type: Required
- Description: Client ID of the ZITADEL application. This can be found under your application in the ZITADEL console.
- Default: `-`
- Example: `123456789012345678@your-project`

#### `AUTH_ZITADEL_CLIENT_SECRET`
#### `AUTH_ZITADEL_SECRET`

- Type: Required
- Description: Client Secret of the ZITADEL application.
Expand All @@ -242,21 +242,21 @@ LobeChat provides a complete authentication service capability when deployed. Th

### Generic OIDC

#### `GENERIC_OIDC_CLIENT_ID`
#### `AUTH_GENERIC_OIDC_ID`

- Type: Required
- Description: Client ID of the Generic OIDC provider application.
- Default: `-`
- Example: `_client_id_for_lobe_chat_`

#### `GENERIC_OIDC_CLIENT_SECRET`
#### `AUTH_GENERIC_OIDC_SECRET`

- Type: Required
- Description: The plaintext of the Client Secret for the Generic OIDC provider
- Default: `-`
- Example: `_client_secret_for_lobe_chat_`

#### `GENERIC_OIDC_ISSUER`
#### `AUTH_GENERIC_OIDC_ISSUER`

- Type: Required
- Description: Issuer of the Generic OIDC provider application.
Expand Down
Loading

0 comments on commit 2820697

Please sign in to comment.