Skip to content

Commit 6c10e4a

Browse files
committed
fix(auth): compensate for uninitialized config
Refs #7814
1 parent 23c3ead commit 6c10e4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/components/auth/oauth2.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ export default class Oauth2 extends React.Component {
130130
const AUTH_FLOW_ACCESS_CODE = isOAS3() ? (oidcUrl ? "authorization_code" : "authorizationCode") : "accessCode"
131131
const AUTH_FLOW_APPLICATION = isOAS3() ? (oidcUrl ? "client_credentials" : "clientCredentials") : "application"
132132

133-
let authConfigs = authSelectors.getConfigs()
134-
let isPkceCodeGrant = authConfigs.usePkceWithAuthorizationCodeGrant === "true" || authConfigs.usePkceWithAuthorizationCodeGrant === true
133+
let authConfigs = authSelectors.getConfigs() || {}
134+
let isPkceCodeGrant = !!authConfigs.usePkceWithAuthorizationCodeGrant
135135

136136
let flow = schema.get("flow")
137137
let flowToDisplay = flow === AUTH_FLOW_ACCESS_CODE && isPkceCodeGrant ? flow + " with PKCE" : flow

0 commit comments

Comments
 (0)