[GH-ISSUE #97] OIDC fails with error 502 after callback #50

Closed
opened 2026-05-07 00:18:20 +02:00 by BreizhHardware · 5 comments

Originally created by @AdriSchmi on GitHub (Sep 24, 2025).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/97

Originally assigned to: @glenndehaan on GitHub.

The problem

Open ID Login shows 502 Bad Gateway after receiving the callback

Image

What version of UniFi Voucher Site has the issue?

8.2.0

What was the last working version of UniFi Voucher Site?

No response

What type of installation are you running?

Docker

Anything in the logs that might be useful for us?

After setting up Open ID Connect with UID i get the error 502 when i try to login

Additional information

No response

Originally created by @AdriSchmi on GitHub (Sep 24, 2025). Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/97 Originally assigned to: @glenndehaan on GitHub. ### The problem Open ID Login shows 502 Bad Gateway after receiving the callback <img width="1155" height="54" alt="Image" src="https://github.com/user-attachments/assets/331d7a47-34d7-42d2-8c7a-25ba327a19f5" /> ### What version of UniFi Voucher Site has the issue? 8.2.0 ### What was the last working version of UniFi Voucher Site? _No response_ ### What type of installation are you running? Docker ### Anything in the logs that might be useful for us? ```Text After setting up Open ID Connect with UID i get the error 502 when i try to login ``` ### Additional information _No response_
BreizhHardware 2026-05-07 00:18:20 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@glenndehaan commented on GitHub (Sep 24, 2025):

Hi @AdriSchmi ,

A 502 would indicate that the service crashes. Or a proxy is not able to reach the service.

Unfortunately I would need a lot more info and logs to be able to assist with this issue.

But I have a feeling this is a configuration error.

Kind regards,
Glenn

<!-- gh-comment-id:3329769386 --> @glenndehaan commented on GitHub (Sep 24, 2025): Hi @AdriSchmi , A 502 would indicate that the service crashes. Or a proxy is not able to reach the service. Unfortunately I would need a lot more info and logs to be able to assist with this issue. But I have a feeling this is a configuration error. Kind regards, Glenn
Author
Owner

@bogosavljevic commented on GitHub (Sep 27, 2025):

Hi @AdriSchmi,

I experienced a similar issue and, since I’m using NGINX Proxy Manager, I was able to resolve it by adding the following custom NGINX configuration:

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 X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;

proxy_buffers 8 16k;
proxy_buffer_size 32k;

client_max_body_size 10m;

Kind regards,
Dimitrije

<!-- gh-comment-id:3342007756 --> @bogosavljevic commented on GitHub (Sep 27, 2025): Hi @AdriSchmi, I experienced a similar issue and, since I’m using NGINX Proxy Manager, I was able to resolve it by adding the following custom NGINX configuration: 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 X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Port $server_port; proxy_buffers 8 16k; proxy_buffer_size 32k; client_max_body_size 10m; Kind regards, Dimitrije
Author
Owner

@glenndehaan commented on GitHub (Sep 29, 2025):

Thank you @bogosavljevic for the suggestion (Might be useful for others in the future). @AdriSchmi Since there was no update I will close this issue for now. If you have more info feel free to post it

<!-- gh-comment-id:3349189203 --> @glenndehaan commented on GitHub (Sep 29, 2025): Thank you @bogosavljevic for the suggestion (Might be useful for others in the future). @AdriSchmi Since there was no update I will close this issue for now. If you have more info feel free to post it
Author
Owner

@AdriSchmi commented on GitHub (Oct 1, 2025):

Sorry i was busy. I can confirm with the settings in Nginx Proxy Manager it works

<!-- gh-comment-id:3356861028 --> @AdriSchmi commented on GitHub (Oct 1, 2025): Sorry i was busy. I can confirm with the settings in Nginx Proxy Manager it works
Author
Owner

@glenndehaan commented on GitHub (Oct 1, 2025):

Awesome great to hear!

<!-- gh-comment-id:3357573665 --> @glenndehaan commented on GitHub (Oct 1, 2025): Awesome great to hear!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/unifi-voucher-site#50
No description provided.