fix(op): check redirect URI in code exchange (#516)
This changes fixes a missing redirect check in the Legacy Server's Code Exchange handler.
This commit is contained in:
parent
984e31a9e2
commit
844e2337bb
1 changed files with 3 additions and 0 deletions
|
@ -210,6 +210,9 @@ func (s *LegacyServer) CodeExchange(ctx context.Context, r *ClientRequest[oidc.A
|
|||
return nil, err
|
||||
}
|
||||
}
|
||||
if r.Data.RedirectURI != authReq.GetRedirectURI() {
|
||||
return nil, oidc.ErrInvalidGrant().WithDescription("redirect_uri does not correspond")
|
||||
}
|
||||
resp, err := CreateTokenResponse(ctx, authReq, r.Client, s.provider, true, r.Data.Code, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue