fix(auth): compensate for uninitialized config

Refs #7814
This commit is contained in:
Vladimir Gorej
2022-01-31 14:21:15 +01:00
parent 23c3eadb28
commit 6c10e4a070

View File

@@ -130,8 +130,8 @@ export default class Oauth2 extends React.Component {
const AUTH_FLOW_ACCESS_CODE = isOAS3() ? (oidcUrl ? "authorization_code" : "authorizationCode") : "accessCode"
const AUTH_FLOW_APPLICATION = isOAS3() ? (oidcUrl ? "client_credentials" : "clientCredentials") : "application"
let authConfigs = authSelectors.getConfigs()
let isPkceCodeGrant = authConfigs.usePkceWithAuthorizationCodeGrant === "true" || authConfigs.usePkceWithAuthorizationCodeGrant === true
let authConfigs = authSelectors.getConfigs() || {}
let isPkceCodeGrant = !!authConfigs.usePkceWithAuthorizationCodeGrant
let flow = schema.get("flow")
let flowToDisplay = flow === AUTH_FLOW_ACCESS_CODE && isPkceCodeGrant ? flow + " with PKCE" : flow