mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #1563] OIDC callback endpoint should use GET and query parameters, not POST with JSON body #3094
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#3094
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 @Tom60chat on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/1563
Describe the bug
The OIDC callback handler (
OIDCCallbackat/oidc_callback) is currently registered as a POST endpoint and attempts to parse a JSON body for thecodeandstateparameters. This does not conform to the OAuth 2.0 (RFC 6749) and OpenID Connect specifications.Problem details
codeandstateincluded as URL query parameters (not a JSON body, and usually not POST).Relevant code (from
api/user/oidc.go):Specification references:
To Reproduce
Expected behavior
The callback endpoint should:
r.GET("/oidc_callback", OIDCCallback))codeandstatefrom query parameters (usingc.Query("code")andc.Query("state")in Gin)Additional context
If you want to support POST with form-encoded body (for providers using
response_mode=form_post), handle that as a special case—but standard OIDC and OAuth2 providers use GET + query parameters.Let me know if you'd like suggestions for updated code!