Repository navigation
Refuse reserved authorization parameters in the entry point options - #96
Merged
Merged
Conversation
The entry point now refuses an "authorizationParameters" option which contains a parameter the client sets itself, like "nonce", "state" or "redirect_uri". This is reported as a ConfigurationException, like other invalid options of the entry point. Previously, the option was only checked for string names and values. Such a parameter passed that check, and starting the login then threw an InvalidArgumentException, which the entry point doesn't catch. Every login ended with status 500 instead of pointing to the configuration. The client now names all reserved parameters itself, including those which the OAuth client sets, so that the entry point can check its options against the same list. The OAuth client keeps its own list private, so the names are repeated here.
robertlemke
force-pushed
the
bugfix/reserved-authorization-parameters
branch
from
October 12, 2026 10:14
71f0ae4 to
51b3a1e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The entry point option
authorizationParametersaccepted parameters which the client sets itself, like "nonce", "state" or "redirect_uri". Starting a login then threw an uncaught InvalidArgumentException, so every login ended with status 500. The entry point now refuses such names when it validates its options and reports them as a ConfigurationException, like other misconfiguration.The client checks against the same list of reserved names before it hands the parameters to the OAuth client. A call of
startAuthorization()with "state" or another name which the OAuth client sets therefore fails with the InvalidArgumentException code 1791540882 of this package, instead of 1789131855 of flownative/oauth2-client.