You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: ignore unrecognized parameters at the token endpoint (#29139)
fix(oauth2): ignore unrecognized token request parameters
Align `/oauth2/tokens` with OAuth 2.1 §3.2 and `/oauth2/authorize` by ignoring unknown parameters and logging only their names at debug level, never values. Continue rejecting duplicate known parameters, with tests covering all nine and shared unknown-parameter inputs across both endpoints. Misspelled optional parameters are now ignored rather than returning 400. Changes are limited to `coderd/oauth2provider`, with no new endpoints or schema changes.
Closes https://linear.app/codercom/issue/PLAT-577
Copy file name to clipboardExpand all lines: docs/admin/integrations/oauth2-provider.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -578,6 +578,17 @@ Two failures stay on Coder rather than reaching your callback, because in both c
578
578
Earlier releases answered on Coder for all of these: `GET` rendered an "Invalid Query Parameters" page and `POST` returned a 400 with a JSON body.
579
579
An integration that watched for either now has to read the error from its own callback.
580
580
581
+
### "invalid_request" from `POST /oauth2/tokens` for a repeated parameter
582
+
583
+
The token endpoint ignores parameters it does not read, as RFC 6749 Section 3.2 requires, so an OIDC `nonce`, a `client_assertion`, or a vendor extension does not fail the exchange.
584
+
A misspelled parameter is ignored on the same rule, so what you see is the failure caused by the parameter you meant to send being absent.
585
+
586
+
A known parameter sent more than once is rejected with a 400 and a JSON body.
587
+
The error is `invalid_request`, except for a repeated `grant_type`, which answers `unsupported_grant_type`.
588
+
589
+
Earlier releases returned 400 `invalid_request` for any parameter the endpoint did not recognize.
590
+
An integration that relied on that error to catch a misspelled optional parameter no longer receives it.
591
+
581
592
### "invalid_target" for a rejected `resource`
582
593
583
594
`resource` must be an absolute URI without a fragment (RFC 8707).
0 commit comments