Skip to content

Commit

Permalink
fix(auth): compensate for uninitialized config
Browse files Browse the repository at this point in the history
Refs #7814
  • Loading branch information
char0n committed Jan 31, 2022
1 parent 23c3ead commit 6c10e4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/components/auth/oauth2.jsx
Expand Up @@ -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
Expand Down

0 comments on commit 6c10e4a

Please sign in to comment.