Skip to content

Commit

Permalink
fix automatic PKCE
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliusPC committed May 14, 2021
1 parent 1688795 commit 24a4ee0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.1]

### Changed
* fixed automatic PKCE

## [1.1.0]

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/OpenIDConnectClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ private function requestAuthorization() {
// PKCE will only used in pure authorization code flow and hybrid flow
if (!$this->unsafeDisablePkce
&& !empty($this->getCodeChallengeMethod())
&& count(array_diff($this->responseTypes, ['token', 'id_token'])) > 0
&& (empty($this->responseTypes) || count(array_diff($this->responseTypes, ['token', 'id_token'])) > 0)
) {
$codeVerifier = \bin2hex(\random_bytes(64));
$this->setCodeVerifier($codeVerifier);
Expand Down

0 comments on commit 24a4ee0

Please sign in to comment.