Skip to content

Commit

Permalink
refactor: cleanup use of checkPKCE
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jan 8, 2023
1 parent 67e208e commit 864cf94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/actions/authorization/check_pkce.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export default function checkPKCE(ctx, next) {
}
}

// checking for response_type presence disables the need for PKCE for device_code grant
if (typeof params.response_type === 'string' && params.response_type.includes('code')) {
if (params.response_type.includes('code')) {
if (
!params.code_challenge
&& (
Expand Down
2 changes: 1 addition & 1 deletion lib/actions/authorization/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default function authorizationAction(provider, endpoint) {
use(() => checkOpenidScope.bind(undefined, allowList), A, DA, PAR, BA);
use(() => checkRedirectUri, A, PAR );
use(() => checkWebMessageUri, A, PAR );
use(() => checkPKCE, A, DA, PAR );
use(() => checkPKCE, A, PAR );
use(() => checkClaims, A, DA, PAR, BA);
use(() => checkMaxAge, A, DA, PAR, BA);
use(() => checkRequestedExpiry, BA);
Expand Down

0 comments on commit 864cf94

Please sign in to comment.