fix: support OAuth2 PKCE when using the OIDC authorization_code flow (#6914)

* Previous checks only supported the OAuth2 authorizationCode flow and missed the equivalent OIDC flow.
This commit is contained in:
Chad Killingsworth
2021-02-10 11:52:35 -06:00
committed by GitHub
parent 710b9d16a3
commit 5e69d3c4f2
2 changed files with 33 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ export default function authorize ( { auth, authActions, errActions, configs, au
query.push("realm=" + encodeURIComponent(authConfigs.realm))
}
if ((flow === "authorizationCode" || flow === "accessCode") && authConfigs.usePkceWithAuthorizationCodeGrant) {
if ((flow === "authorizationCode" || flow === "authorization_code" || flow === "accessCode") && authConfigs.usePkceWithAuthorizationCodeGrant) {
const codeVerifier = generateCodeVerifier()
const codeChallenge = createCodeChallenge(codeVerifier)