-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Issue with redirect_uri in Authorization Code Grant #1418
Comments
Have you got a redirect Uri registered against your client? |
Yes, my |
Thanks for reporting this. I think I have a solution figured out. I'm going to change the code so we validate that if a redirect URI is passed, it must be a valid URI as per the specs. That negates the need to check for non empty strings as we shouldn't be accepting these in the first place. I'll finalise this tomorrow and submit a fix. Thank you |
Hi @Sephster, wondering if you might have an update on this task. Hoping to see this bug addressed before we rollout this library, so we don't need to force our partners to specify the redirect_uri every time |
Sorry @ls-sean-fraser I got a virus and then had a secondary infection caused by that which has had me out of action for nearly a fortnight. Aim to get back to this this week as slowly feeling better. Sorry for the delay |
addresses thephpleague#1418 Also fixed event emitter trait not storing automatically created instance (addresses thephpleague#1422)
addresses thephpleague#1418 Also fixed event emitter trait not storing automatically created instance (addresses thephpleague#1422)
Sorry to hear that, @Sephster. I went ahead and put up a PR to address this if that helps. I hope you feel better soon. |
Using version 9.0.0, using authorization code grant without specifying a redirect_uri in both requests does not seem to be accepted. The spec indicates these are only required if used in both places.
When using a default Authorization code entity...
If the redirect_uri is omitted from the authorize request, the authorization code contains a redirect_uri of
null
.The access token call then fail here, As the value is
null
, but it is checking for empty stringhttps://github.com/thephpleague/oauth2-server/blob/master/src/Grant/AuthCodeGrant.php#L220-L224
Forcing the null redirect_uri to be empty string in the entity doesn't resolve the issue as the subsequent check which will fail to compare redirect_uri of the code and the request, as
'' !== null
.I suspect that the check above should be changed to be:
The text was updated successfully, but these errors were encountered: