Merge pull request #842 from sgomez/fix-challenge-pkce

Fix S256 code challenge method
This commit is contained in:
Andrew Millington
2018-01-25 23:16:15 +00:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
case 'S256':
if (
hash_equals(
hash('sha256', strtr(rtrim(base64_encode($codeVerifier), '='), '+/', '-_')),
strtr(rtrim(base64_encode(hash('sha256', $codeVerifier, true)), '='), '+/', '-_'),
$authCodePayload->code_challenge
) === false
) {