Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 更新文档 #3386

Closed
ykangw opened this issue Aug 2, 2024 · 13 comments
Closed

[Bug] 更新文档 #3386

ykangw opened this issue Aug 2, 2024 · 13 comments

Comments

@ykangw
Copy link

ykangw commented Aug 2, 2024

📦 Environment

Vercel

📌 Version

1.8.0

💻 Operating System

macOS

🌐 Browser

Chrome

🐛 Bug Description

Lobe在1.8.0版本已支持基于NextAuth的服务器端数据库,但是文档还没有更新。使用当前的文档,很难正确配置NextAuth和服务器端数据库。

此外,如果只想使用NextAuth作为身份验证,而不使用服务器端数据库,对照当前文档的“身份验证”部分配置环境变量后,不显示SSO登陆界面的问题仍然没有解决 #3136

希望确认,这是一个bug,还是文档中的环境变量没有更新。

📷 Recurrence Steps

No response

🚦 Expected Behavior

希望更新文档“私有化部署”中关于“服务器端数据库”和“身份验证”部分的内容。

📝 Additional Information

No response

@ykangw ykangw added the 🐛 Bug Something isn't working | 缺陷 label Aug 2, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Aug 2, 2024
@lobehubbot
Copy link
Member

👀 @ykangw

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@ykangw ykangw changed the title [Bug] [Bug] 更新文档 Aug 2, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Aug 2, 2024

服务端 Database 的镜像会单独打出来,所以再耐心等待一会

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The image of the server database will be printed separately, so wait patiently for a while.

@arvinxx arvinxx removed the 🐛 Bug Something isn't working | 缺陷 label Aug 3, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Aug 3, 2024

先在这里列一个极简示例吧,文档需要做一次结构调整,还要点时间。

  1. 创建 pg 实例(注意:以下命令仅用于演示,因为这个 pg 实例并没有包含持久化部分)
docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
  1. 创建一个 lobe-chat.env 文件用于存放环境变量:
# DB 必须
KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=
DATABASE_URL=postgres://postgres:mysecretpassword@my-postgres:5432/postgres

# NEXT_AUTH 相关
NEXT_AUTH_SECRET=3904039cd41ea1bdf6c93db0db96e250
NEXT_AUTH_SSO_PROVIDERS=auth0
NEXTAUTH_URL=https://your-prod-domain.com/api/auth
AUTH0_CLIENT_ID=xxxxxx
AUTH0_CLIENT_SECRET=cSX_xxxxx
AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com

# S3 相关
S3_ACCESS_KEY_ID=xxxxxxxxxx
S3_SECRET_ACCESS_KEY=xxxxxxxxxx
S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com
S3_BUCKET=lobechat
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com
  1. 启动 lobe-chat-database docker 镜像
docker run -it -d -p 3210:3210 --network pg --env-file lobe-chat.env lobehub/lobe-chat-database

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Let’s list a minimalist example here first. The document needs a structural adjustment, which will take some time.

  1. Create a pg instance (Note: The following naming is for demonstration only, because it does not include this pg instance and does not include the persistence part)
docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres
  1. Create a lobe-chat.env file to store environment variables:
# DB required
KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=
DATABASE_URL=postgres://postgres:mysecretpassword@my-postgres:5432/postgres

# NEXT_AUTH related
NEXT_AUTH_SECRET=3904039cd41ea1bdf6c93db0db96e250
NEXT_AUTH_SSO_PROVIDERS=auth0
NEXTAUTH_URL=https://your-prod-domain.com/api/auth
AUTH0_CLIENT_ID=xxxxxx
AUTH0_CLIENT_SECRET=cSX_xxxxx
AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com

# S3 related
S3_ACCESS_KEY_ID=xxxxxxxxxx
S3_SECRET_ACCESS_KEY=xxxxxxxxxx
S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com
S3_BUCKET=lobechat
NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com
  1. Start the lobe-chat-database docker image
docker run -it -d -p 3210:3210 --network pg --env-file lobe-chat.env lobehub/lobe-chat-database

@arvinxx
Copy link
Contributor

arvinxx commented Aug 3, 2024

#3391

@arvinxx arvinxx closed this as completed Aug 3, 2024
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Aug 3, 2024
@lobehubbot
Copy link
Member

@ykangw

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@cy948
Copy link
Contributor

cy948 commented Aug 3, 2024

此外,如果只想使用NextAuth作为身份验证,而不使用服务器端数据库,对照当前文档的“身份验证”部分配置环境变量后,不显示SSO登陆界面的问题仍然没有解决 #3136

你好,这个 BUG 仍然复现吗? 您使用了哪些环境变量呢? 我使用以下环境变量时没有出现问题。

NEXT_AUTH_SECRET=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_ISSUER=https://*.auth0.com

Auth0 不需要指定启用,所以省略了 NEXT_AUTH_SSO_PROVIDERS

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In addition, if you only want to use NextAuth as authentication without using the server-side database, after configuring the environment variables according to the "Authentication" section of the current document, the problem of not displaying the SSO login interface is still not solved https://github.com //issues/3136

Hello, is this bug still reoccurring? What environment variables did you use? I use the following environment variables without issue.

NEXT_AUTH_SECRET=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_ISSUER=https://*.auth0.com

Auth0 does not need to be enabled, so NEXT_AUTH_SSO_PROVIDERS is omitted

@ykangw
Copy link
Author

ykangw commented Aug 3, 2024

此外,如果只想使用NextAuth作为身份验证,而不使用服务器端数据库,对照当前文档的“身份验证”部分配置环境变量后,不显示SSO登陆界面的问题仍然没有解决 #3136

你好,这个 BUG 仍然复现吗? 您使用了哪些环境变量呢? 我使用以下环境变量时没有出现问题。

NEXT_AUTH_SECRET=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_ISSUER=https://*.auth0.com

Auth0 不需要指定启用,所以省略了 NEXT_AUTH_SSO_PROVIDERS

你好,经过检查,是我的next auth设置不对,经过修正,已经可以使用azure ad正常进行sso登陆。非常感谢!

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In addition, if you only want to use NextAuth as authentication without using the server-side database, after configuring the environment variables according to the "Authentication" section of the current document, the problem of not displaying the SSO login interface is still not solved #3136

Hello, does this BUG still recur? What environment variables did you use? I use the following environment variables without issue.

``dotenv
NEXT_AUTH_SECRET=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_ISSUER=https://*.auth0.com


> Auth0 does not need to be enabled, so `NEXT_AUTH_SSO_PROVIDERS` is omitted

Hello, after checking, it was found that my next auth settings were incorrect. After correction, I can now use Azure AD for normal SSO login. Thank you so much!

@uyu365
Copy link

uyu365 commented Aug 20, 2024

KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=
请问这个KEY_VAULTS_SECRET是什么意思?这个值可以自定义吗? @lobehubbot @arvinxx

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=
What does this KEY_VAULTS_SECRET mean? Can this value be customized?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants