Skip to content

Commit 5caa629

Browse files
authored
fix: require redirect_uri in openid requests (#3900)
Resolves a deviation from the OpenID Connect spec, where the `redirect_uri` was not required when performing flows with `scope=openid`. BREAKING CHANGE: Going forward, OAuth2 Clients requesting an OpenID Connect flow **must** include the `redirect_uri` parameter or the request will be rejected.
1 parent d53b416 commit 5caa629

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

go.mod

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ replace github.com/ory/hydra-client-go/v2 => ./internal/httpclient
88

99
replace github.com/gobuffalo/pop/v6 => github.com/ory/pop/v6 v6.2.1-0.20241121111754-e5dfc0f3344b
1010

11-
// Bump Fosite to https://github.com/ory/fosite/tree/hperl/v0.47.0%2B168636f, which contains
12-
// https://github.com/ory/fosite/commit/b40b1cbb1997e2160eaaf97fb6f73960db4c6118 and https://github.com/ory/fosite/pull/833/commits/eab241e153a4c97abe2e4c6e654f20b9ae206473 on top of the latest release.
13-
//
14-
// This is needed until we release the next version of the master branch, as that branch already contains the redirect URI validation fix, which
15-
// may be breaking for some users.
16-
replace github.com/ory/fosite => github.com/ory/fosite v0.47.1-0.20241101073333-eab241e153a4
17-
1811
require (
1912
github.com/ThalesIgnite/crypto11 v1.2.5
2013
github.com/bradleyjkemp/cupaloy/v2 v2.8.0
@@ -40,7 +33,7 @@ require (
4033
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
4134
github.com/oleiade/reflections v1.0.1
4235
github.com/ory/analytics-go/v5 v5.0.1
43-
github.com/ory/fosite v0.47.0
36+
github.com/ory/fosite v0.48.0
4437
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe
4538
github.com/ory/graceful v0.1.3
4639
github.com/ory/herodot v0.10.3-0.20230626083119-d7e5192f0d88

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ github.com/ory/analytics-go/v5 v5.0.1 h1:LX8T5B9FN8KZXOtxgN+R3I4THRRVB6+28IKgKBp
378378
github.com/ory/analytics-go/v5 v5.0.1/go.mod h1:lWCiCjAaJkKfgR/BN5DCLMol8BjKS1x+4jxBxff/FF0=
379379
github.com/ory/dockertest/v3 v3.10.1-0.20240704115616-d229e74b748d h1:By96ZSVuH5LyjXLVVMfvJoLVGHaT96LdOnwgFSLVf0E=
380380
github.com/ory/dockertest/v3 v3.10.1-0.20240704115616-d229e74b748d/go.mod h1:F2FIjwwAk6CsNAs//B8+aPFQF0t84pbM8oliyNXwQrk=
381-
github.com/ory/fosite v0.47.1-0.20241101073333-eab241e153a4 h1:1pEVHGC+Dx2xMPMgpRgG3lyejyK8iU9KKfSnLowLYd8=
382-
github.com/ory/fosite v0.47.1-0.20241101073333-eab241e153a4/go.mod h1:AZyn1jrABUaGN12RHcWorRLbqLn52gTdHaIYY81m5J0=
381+
github.com/ory/fosite v0.48.0 h1:zxNPNrCBsFwujviVPhbHZzSHZNzjBFZ36MeBFz6tCuU=
382+
github.com/ory/fosite v0.48.0/go.mod h1:M+C+Ng1UDNgwX4SaErnuZwEw26uDN7I3kNUt0WyValI=
383383
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe h1:rvu4obdvqR0fkSIJ8IfgzKOWwZ5kOT2UNfLq81Qk7rc=
384384
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe/go.mod h1:z4n3u6as84LbV4YmgjHhnwtccQqzf4cZlSk9f1FhygI=
385385
github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8=

oauth2/oauth2_auth_code_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,7 @@ func newOAuth2Client(
21202120
return c, &oauth2.Config{
21212121
ClientID: c.GetID(),
21222122
ClientSecret: secret,
2123+
RedirectURL: callbackURL,
21232124
Endpoint: oauth2.Endpoint{
21242125
AuthURL: reg.Config().OAuth2AuthURL(ctx).String(),
21252126
TokenURL: reg.Config().OAuth2TokenURL(ctx).String(),

0 commit comments

Comments
 (0)