-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State parameter not preserved in authentication error response #1642
Comments
It seems to me like there is a slight error in fosite (https://github.com/ory/fosite/blob/master/authorize_request_handler.go#L265) where the state parameter doesn't even get read until all of the other parameters are validated. Does this seem like the cause? |
Yes, looks like that could be the cause! |
Would you be up for a PR in Fosite? :) |
Opening one now :) |
PR opened. Sorry for the crudity. This is my first PR with Go, so I might have missed some style points. |
Awesome - thanks! By bumping |
Describe the bug
When a client is requesting authentication with invalid scopes, the invalid_scope error is triggered and returned to the client in an authentication error response. However, if a state parameter is passed in the authentication request, is is not passed back in the response as described in https://openid.net/specs/openid-connect-core-1_0.html#AuthError.
This was actually found on accident when using
oidc-client
and requesting an invalid scope. The requests looked like as follows:OAuth Authentication Request:
Authentication Response:
Notice that the state parameter is empty, however the error is correct.
Environment
I will poke around to see if I can pinpoint the issue, just wanted to open an issue to track it.
Thanks for the great service. Honestly this is the first issue I have come across, and it is a small one at that. With Hydra, we (who shall not be named) are processing over 20,000 authorization requests a week, serving close to 1,000 users.
The text was updated successfully, but these errors were encountered: