mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #3183] OIDC - OpenId Connect authentication fail for application behind NGINX #2157
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @slysiou on GitHub (Sep 6, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3183
Checklist
jc21/nginx-proxy-manager:latestdocker image?Yes
Yes
Yes
Describe the bug
NGINX Proxy Manager is facing internet. I tried to use OpenID Connect for authentication behind it.
Internet --- NGINX proxy manager --- APISIX with openid-connect --- Web appKeycloak is used for OIDC server.
I tried to use APISIX to manage the authentication (behind NGINX Proxy Manager) without success.
https://github.com/apache/apisix/issues/10149
We get to the conclusions that was a cookies issue with cross-site access.
But, keycloak cookie is set properly and I didn't find anywhere in NGINX Proxy Manager:
'set $session_cookie_samesite Strict;'
If I bypass NGINX Proxy Manager with ngrok tunnelling. Callback authentication works.
So, I tried with a small nodejs app directly behind the NGINX Proxy Manager to simplify the problem.
I get the same issue. Callback to the app can not be decoded properly, an information is missing.
Nginx Proxy Manager Version
v2.10.4To Reproduce
This is the nodejs code:
<BASE_URL>/callback?state=eyJyZXR1cm5UbyI6Ii8ifQ&session_state=a7fd9407-e2c3-474c-8625-117276ed6bc0&code=a10612fc-664f-41f5-aaa3-9900d38433eb.a7fd9407-e2c3-474c-8625-117276fc6bc0.ab703194-4f67-4d9e-8a26-eff7867dc310and page:
Operating System
Linux Debian
@github-actions[bot] commented on GitHub (Apr 6, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@kmdeveloping commented on GitHub (Nov 5, 2024):
I am also seeing this issue with AzureAd auth
Setup
Public -> NPM -> Blazor Docker App
502 bad gateway response when auth call back is returned at /signin-oidc
Some research suggests default payload size is 4kb and may need to be bumped up.
@mreic commented on GitHub (Jun 26, 2025):
Could you solve that issue?
I ran into this also and cannot find any solution.
@kmdeveloping commented on GitHub (Jun 26, 2025):
I added this to the advanced config section to increase payload size.
@mreic commented on GitHub (Jun 27, 2025):
Okay thank you. I tried, and it solved the 502 error, but login over oauth did not work anyways
@kmdeveloping commented on GitHub (Jun 27, 2025):
What is your app stack? Are you saying it did not work due to Nginx proxy manager? Maybe if you have logs or code to show, some can help get things moving.
@fapo85 commented on GitHub (Dec 8, 2025):
Here is a nice-to-copy version of the screenshot.
This solved the problem for me.
proxy_busy_buffers_size 512k; proxy_buffers 4 512k; proxy_buffer_size 256k;My tech stack is a dotnet backend service and Authentik as an IDP.