lobe-chat icon indicating copy to clipboard operation
lobe-chat copied to clipboard

Docker 部署的lobe-hcat,接入auth0认证,环境变量都ok,但点击Sign on with Auth0后报500 Internal Server Error [Bug]

Open Jerryye17 opened this issue 1 year ago • 5 comments

💻 Operating System

Other Linux

📦 Environment

Docker

🌐 Browser

Chrome

🐛 Bug Description

0.151.1最新版本Lobe-Chat,接入Auth0,配置完全按照官方的操作:https://lobehub.com/zh/docs/self-hosting/advanced/sso-providers/auth0,同时也配置了NEXTAUTH_URL=https://自己的域名/api/auth,但点击Sign on with Auth0后报500 Internal Server Error

Request URL: https://xxx.com/api/auth/signin/auth0 Request Method: POST Status Code: 500 Internal Server Error Remote Address: 127.0.0.1:7890 Referrer Policy: strict-origin-when-cross-origin

🚦 Expected Behavior

No response

📷 Recurrence Steps

No response

📝 Additional Information

No response

Jerryye17 avatar Apr 29 '24 13:04 Jerryye17

👀 @Jerryye17

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

lobehubbot avatar Apr 29 '24 13:04 lobehubbot

我的部署方式: docker run -d -p 3210:3210
-e OPENAI_API_KEY=sk-Q8eIJ7bxxxxxxxxxxxxxxxxxxxxxPj5NNR5RPyv
-e OPENAI_PROXY_URL=http://x.x.x.x:9000/v1
-e OLLAMA_PROXY_URL=http://10.160.139.44:11434
-e ENABLE_OAUTH_SSO=1
-e NEXTAUTH_SECRET=zwck+67A0J7/Ro/cC79sdfsdfsdggsgMEnFw3wM8uA=
-e SSO_PROVIDERS=auth0
-e AUTH0_CLIENT_ID=od39McW88udsdfsfsdfgW55G49GgoA2
-e AUTH0_CLIENT_SECRET=Xjq7GfwSWkXisdfsdfsdfsdfsdf2XzybyvUGZeOMWfOf5oubEOkVy0e
-e AUTH0_ISSUER=dev-xgqsdfsfsdfqu54f3.us.auth0.com
-e ACCESS_CODE=123456ABCDEF
-e NEXTAUTH_URL=https://自己的域名/api/auth
--name lobe-chat lobehub/lobe-chat

Jerryye17 avatar Apr 29 '24 13:04 Jerryye17

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


How I deploy: docker run -d -p 3210:3210
-e OPENAI_API_KEY=sk-Q8eIJ7bxxxxxxxxxxxxxxxxxxxxxxxxPj5NNR5RPyv
-e OPENAI_PROXY_URL=http://x.x.x.x:9000/v1
-e OLLAMA_PROXY_URL=http://10.160.139.44:11434
-e ENABLE_OAUTH_SSO=1
-e NEXTAUTH_SECRET=zwck+67A0J7/Ro/cC79sdfsdfsdggsgMEnFw3wM8uA=
-e SSO_PROVIDERS=auth0
-e AUTH0_CLIENT_ID=od39McW88udsdfsfsdfgW55G49GgoA2
-e AUTH0_CLIENT_SECRET=Xjq7GfwSWkXisdfsdfsdfsdfsdf2XzybyvUGZeOMWfOf5oubEOkVy0e
-e AUTH0_ISSUER=dev-xgqsdfsfsdfqu54f3.us.auth0.com
-e ACCESS_CODE=123456ABCDEF
-e NEXTAUTH_URL=https://own domain name/api/auth
--name lobe-chat lobehub/lobe-chat

lobehubbot avatar Apr 29 '24 13:04 lobehubbot

@cy948 又得你来帮忙看看了~

arvinxx avatar Apr 29 '24 15:04 arvinxx

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


@cy948 I need your help again~

lobehubbot avatar Apr 29 '24 15:04 lobehubbot

AUTH0_ISSUER 前面添加 https:// 再试试

cy948 avatar Apr 30 '24 02:04 cy948

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


Add https:// in front of AUTH0_ISSUER and try again

lobehubbot avatar Apr 30 '24 02:04 lobehubbot

感谢,确实在AUTH0_ISSUER 前面添加 https:// 就解决问题了

Jerryye17 avatar Apr 30 '24 03:04 Jerryye17

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


Thanks, adding https:// in front of AUTH0_ISSUER solved the problem.

lobehubbot avatar Apr 30 '24 03:04 lobehubbot

✅ @Jerryye17

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

lobehubbot avatar Apr 30 '24 03:04 lobehubbot

部署参数需要在auth0的domian前加https -e AUTH0_ISSUER=https://dev-xxxxx.auth0.com

Jerryye17 avatar Apr 30 '24 03:04 Jerryye17

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


Deployment parameters need to add https before domian of auth0 -e AUTH0_ISSUER=https://dev-xxxxx.auth0.com

lobehubbot avatar Apr 30 '24 03:04 lobehubbot