Skip to content

Commit

Permalink
fix: missing issuer regression in OIDC (#3220)
Browse files Browse the repository at this point in the history
Closes #3182
Closes #3040
  • Loading branch information
aeneasr authored Apr 7, 2023
1 parent 0ba0bd6 commit 52f0740
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions selfservice/strategy/oidc/provider_auth0.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (
"path"
"time"

"github.com/ory/x/stringsx"

"github.com/tidwall/sjson"

"github.com/hashicorp/go-retryablehttp"
Expand Down Expand Up @@ -116,6 +118,7 @@ func (g *ProviderAuth0) Claims(ctx context.Context, exchange *oauth2.Token, quer
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}

claims.Issuer = stringsx.Coalesce(claims.Issuer, g.config.IssuerURL)
return &claims, nil
}

Expand Down
3 changes: 3 additions & 0 deletions selfservice/strategy/oidc/provider_gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"net/url"
"path"

"github.com/ory/x/stringsx"

"github.com/hashicorp/go-retryablehttp"

"github.com/ory/x/httpx"
Expand Down Expand Up @@ -101,6 +103,7 @@ func (g *ProviderGitLab) Claims(ctx context.Context, exchange *oauth2.Token, que
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}

claims.Issuer = stringsx.Coalesce(claims.Issuer, g.config.IssuerURL)
return &claims, nil
}

Expand Down
1 change: 0 additions & 1 deletion selfservice/strategy/oidc/provider_netid.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ func (n *ProviderNetID) Claims(ctx context.Context, exchange *oauth2.Token, _ ur
if err := json.NewDecoder(resp.Body).Decode(&userinfo); err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}

userinfo.Issuer = claims.Issuer
userinfo.Subject = claims.Subject
return &userinfo, nil
Expand Down

0 comments on commit 52f0740

Please sign in to comment.