[Bug] 本地Windows部署,登录认证回调报错 #5518
Replies: 7 comments 6 replies
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
分别使用casdoor和auth0,都是报同样的错误。 |
Beta Was this translation helpful? Give feedback.
-
Using casdoor and auth0 respectively, the same error is reported. |
Beta Was this translation helpful? Give feedback.
-
@muwingueaiguei 你好!我是一个可以帮助你解决bug,回答问题,并成为贡献者的机器人。我可以在等待人类维护者的时候帮助你。 To resolve the AdapterError encountered during Casdoor login callback in your locally deployed LobeChat application on Windows, ensure the following:
By ensuring these configurations are correct, you should be able to resolve the AdapterError during the Casdoor login callback [1]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
-
@cy948 来看看? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
介绍一下这几个应用所处的环境,lobechat, pgsql, casdoor。确保lobechat所在的容器能访问数据库和casdoor. |
Beta Was this translation helpful? Give feedback.
-
📦 部署环境
Other
📌 软件版本
1.47.5
💻 系统环境
Windows
🌐 浏览器
Chrome
🐛 问题描述
我在本地vscode中以server方式正常启动项目
当使用casdoor登录时,回调报错
1、输入登录用户密码后,直接跳转到 https://192.168.1.134:3010/api/auth/error
2、后端报错如下:
[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror at acc.<computed> (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:1366:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Module.callback (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:3806:33) at async AuthInternal (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:4859:24) at async Auth (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:5120:34) at async AppRouteRouteModule.do (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:10:32847) at async AppRouteRouteModule.handle (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:10:39868) at async doRender (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:1452:42) at async responseGenerator (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:1822:28) at async DevServer.renderToResponseWithComponentsImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:1832:28) at async DevServer.renderPageComponent (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:2259:24) at async DevServer.renderToResponseImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:2297:32) at async DevServer.pipeImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:959:25) at async NextNodeServer.handleCatchallRenderRequest (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\next-server.js:281:17) at async DevServer.handleRequestImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:853:17) at async E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\dev\next-dev-server.js:371:20 at async Span.traceAsyncFn (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\trace\trace.js:153:20) at async DevServer.handleRequest (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\dev\next-dev-server.js:368:24) at async invokeRender (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\router-server.js:230:21) at async handleRequest (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\router-server.js:408:24) at async requestHandlerImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\router-server.js:432:13) at async Server.requestListener (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\start-server.js:146:13) [auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror at acc.<computed> (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:1366:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Module.callback (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:3806:33) at async AuthInternal (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:4859:24) at async Auth (E:\17_Vue_React\lobe-chat-main\.next\server\chunks\node_modules__pnpm_3d15eb._.js:5120:34) at async AppRouteRouteModule.do (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:10:32847) at async AppRouteRouteModule.handle (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:10:39868) at async doRender (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:1452:42) at async responseGenerator (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:1822:28) at async DevServer.renderToResponseWithComponentsImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:1832:28) at async DevServer.renderPageComponent (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:2259:24) at async DevServer.renderToResponseImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:2297:32) at async DevServer.pipeImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:959:25) at async NextNodeServer.handleCatchallRenderRequest (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\next-server.js:281:17) at async DevServer.handleRequestImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\base-server.js:853:17) at async E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\dev\next-dev-server.js:371:20 at async Span.traceAsyncFn (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\trace\trace.js:153:20) at async DevServer.handleRequest (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\dev\next-dev-server.js:368:24) at async invokeRender (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\router-server.js:230:21) at async handleRequest (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\router-server.js:408:24) at async requestHandlerImpl (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\router-server.js:432:13) at async Server.requestListener (E:\17_Vue_React\lobe-chat-main\node_modules\.pnpm\next@15.1.5_@babel+core@7.26.0_@opentelemetry+api@1.9.0_@playwright+test@1.49.1_react-dom@19._gjluzxyayy7ntgi7rjyylzka3q\node_modules\next\dist\server\lib\start-server.js:146:13) GET /api/auth/callback/auth0?code=4Gh8YFyb6efeGX1W-tha_Nh_nyY7CgDIbqegQFduB9Kbs 302 in 3220ms [NextAuth] Error: { cause: 'Configuration', message: 'Wrong configuration, make sure you have the correct environment variables set. Visit https://lobehub.com/docs/self-hosting/advanced/authentication for more details.', name: 'NextAuth Error' } GET /api/auth/error?error=Configuration 200 in 1683ms
配置信息如下
`APP_URL=http://192.168.1.134:3010
NextAuth related configurations
NEXT_AUTH_SSO_PROVIDERS=casdoor
NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg
Casdoor secret
AUTH_CASDOOR_ID=4da6d609208ebe15b658
AUTH_CASDOOR_SECRET=b0f98d7addeb7d099679886cfa3f5f01b30d3e5d
AUTH_CASDOOR_ISSUER=http://192.168.153.120:8000/
AUTH_URL=http://192.168.1.134:3010/api/auth
NEXTAUTH_URL=http://192.168.1.134:3010/api/auth
Auth0 configurations
AUTH_AUTH0_ID=uf4NQbhAKT5lfBP5bSlimDGjQFBlJ87T
AUTH_AUTH0_SECRET=-NgEz1fajy0yDvcinHmFXXDgD3-6S2xXNKVHdcA4p3TYJSd7bLeFLh8vLpofSrtd
AUTH_AUTH0_ISSUER=https://dev-rpj0kfqyvk1xt060.us.auth0.com
NEXT_PUBLIC_SERVICE_MODE=server
Postgres database URL
数据库 配置
Postgres 相关,也即 DB 必须的环境变量
必填,用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成
KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=
必填,Postgres 数据库连接字符串,用于连接到数据库
格式:postgresql://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器且位于同一 docker-compose 文件中,亦可使用容器名作为 host
DATABASE_URL=postgresql://postgres:mysecretpassword@192.168.153.120:5432/my-postgres`
casdoor配置如下
auth0配置如下
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
我的casdoor是装在局域网下的docker中,auth0是用的官网的域名。搞几天了,还是不行。忘回复!
Beta Was this translation helpful? Give feedback.
All reactions