mirror of
https://github.com/zitadel/oidc.git
synced 2026-05-12 13:48:27 -05:00
feat(op): PKCE Verification in Legacy Server when AuthMethod is not NONE and CodeVerifier is not Empty (#496)
* add logic for legacy server pkce verification when auth method is not None, and code verifier is not empty. * update per Tim's direction
This commit is contained in:
@@ -205,7 +205,7 @@ func (s *LegacyServer) CodeExchange(ctx context.Context, r *ClientRequest[oidc.A
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if r.Client.AuthMethod() == oidc.AuthMethodNone {
|
||||
if r.Client.AuthMethod() == oidc.AuthMethodNone || r.Data.CodeVerifier != "" {
|
||||
if err = AuthorizeCodeChallenge(r.Data.CodeVerifier, authReq.GetCodeChallenge()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user