Commit 1da0cc1
committed
Fix OIDC client authentication for POST method after f7e8726
Remove the `proxy_pass_request_body off` directive, which unintentionally broke
OIDC client authentication using the POST body method (`client_secret_post`).
Previously, when `$oidc_client_auth_method` was set to "client_secret_post"
the `generateTokenRequestParams()` function correctly formatted the POST
request and sent it via `r.subrequest` to the internal `/_token` location.
However, the `proxy_pass_request_body off` directive caused the POST request
to reach `$oidc_token_endpoint` with a valid Content-Length header but an
empty body. This led to a timeout as the OP token endpoint closed the connection.
Users encountered the error: "NGINX / OpenID Connect login failure."
This commit restores functionality by ensuring the request body is passed
to the token endpoint while retaining header exclusion to prevent CORS issues.1 parent f7e8726 commit 1da0cc1
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
43 | 42 | | |
44 | | - | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| |||
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | | - | |
59 | | - | |
| 56 | + | |
60 | 57 | | |
61 | | - | |
62 | 58 | | |
63 | 59 | | |
64 | 60 | | |
| |||
0 commit comments