Skip to content

[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response (unexpected HTTP status code) #7505

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

Open
vseal001 opened this issue Apr 21, 2025 · 3 comments

Comments

@vseal001
Copy link

按照教程docker-composer安装后部署宝塔面板反向代理:
https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#complete-reverse-proxy-configuration

部署后登录lobe会出现如下错误:

(node:30) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ... to show where the warning was created)
[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)
at OPE (/app/.next/server/chunks/41496.js:3960:12)
at processDiscoveryResponse (/app/.next/server/chunks/41496.js:4108:15)
at getAuthorizationUrl (/app/.next/server/chunks/41496.js:7678:26)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async signIn (/app/.next/server/chunks/41496.js:7841:56)
at async AuthInternal (/app/.next/server/chunks/41496.js:8049:24)
at async Auth (/app/.next/server/chunks/41496.js:8268:34)
at async tf.do (/app/node_modules/.pnpm/next@15.3.1_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.52.0_react-dom@19_25paf3vek2gxo4yxsy44oju3wy/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:18835)
at async tf.handle (/app/node_modules/.pnpm/next@15.3.1_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.52.0_react-dom@19_25paf3vek2gxo4yxsy44oju3wy/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:18:23727)
at async doRender (/app/node_modules/.pnpm/next@15.3.1_@babel+core@7.26.10_@opentelemetry+api@1.9.0_@playwright+test@1.52.0_react-dom@19_25paf3vek2gxo4yxsy44oju3wy/node_modules/next/dist/server/base-server.js:1513:42)

此问题已找到解决措施:
*如果已经在宝塔面板执行CasDoor/*路径的反向代理,如下面配置:


#PROXY-START/

location ^~ /
{
    proxy_pass http://127.0.0.1:8000/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header REMOTE-HOST $remote_addr;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
    proxy_http_version 1.1;
    # proxy_hide_header Upgrade;

    add_header X-Cache $upstream_cache_status;

    #Set Nginx Cache
    
    
    set $static_fileL3gEs8c2 0;
    if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
    {
    	set $static_fileL3gEs8c2 1;
    	expires 1m;
        }
    if ( $static_fileL3gEs8c2 = 0 )
    {
    add_header Cache-Control no-cache;
    }
}

#PROXY-END/

只要确认你部署的https://example.com/.well-known/openid-configuration能够正常访问,如下的配置就要在宝塔网站面板再配置

location /.well-known/openid-configuration {
  proxy_pass http://localhost:8000;  # 转发到 localhost:8000
  proxy_set_header Host $host;  # 保留原始主机头
  proxy_set_header X-Real-IP $remote_addr;  # 保留客户端真实IP
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  # 保留转发的IP
  proxy_set_header X-Forwarded-Proto $scheme;  # 保留请求协议
}

``
@lobehubbot
Copy link
Member

👀 @vseal001

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

@vseal001
Copy link
Author

已解决,建议官方更新教程。

@lobehubbot
Copy link
Member

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


Resolved, it is recommended to update the tutorial officially.

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

No branches or pull requests

2 participants