diff --git a/web/src/pages/sources/oauth/OAuthSourceForm.ts b/web/src/pages/sources/oauth/OAuthSourceForm.ts index ff3201a79..6b898e4d9 100644 --- a/web/src/pages/sources/oauth/OAuthSourceForm.ts +++ b/web/src/pages/sources/oauth/OAuthSourceForm.ts @@ -196,7 +196,7 @@ export class OAuthSourceForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.source?.authenticationFlow === flow.pk; - if (!this.source?.authenticationFlow && flow.slug === "default-source-authentication") { + if (!this.source?.pk && !this.source?.authenticationFlow && flow.slug === "default-source-authentication") { selected = true; } return html``; @@ -216,7 +216,7 @@ export class OAuthSourceForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.source?.enrollmentFlow === flow.pk; - if (!this.source?.enrollmentFlow && flow.slug === "default-source-enrollment") { + if (!this.source?.pk && !this.source?.enrollmentFlow && flow.slug === "default-source-enrollment") { selected = true; } return html``; diff --git a/web/src/pages/sources/saml/SAMLSourceForm.ts b/web/src/pages/sources/saml/SAMLSourceForm.ts index 87de1617e..2fc1dfc28 100644 --- a/web/src/pages/sources/saml/SAMLSourceForm.ts +++ b/web/src/pages/sources/saml/SAMLSourceForm.ts @@ -227,7 +227,7 @@ export class SAMLSourceForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.source?.preAuthenticationFlow === flow.pk; - if (!this.source?.preAuthenticationFlow && flow.slug === "default-source-pre-authentication") { + if (!this.source?.pk && !this.source?.preAuthenticationFlow && flow.slug === "default-source-pre-authentication") { selected = true; } return html``; @@ -247,7 +247,7 @@ export class SAMLSourceForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.source?.authenticationFlow === flow.pk; - if (!this.source?.authenticationFlow && flow.slug === "default-source-authentication") { + if (!this.source?.pk && !this.source?.authenticationFlow && flow.slug === "default-source-authentication") { selected = true; } return html``; @@ -267,7 +267,7 @@ export class SAMLSourceForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.source?.enrollmentFlow === flow.pk; - if (!this.source?.enrollmentFlow && flow.slug === "default-source-enrollment") { + if (!this.source?.pk && !this.source?.enrollmentFlow && flow.slug === "default-source-enrollment") { selected = true; } return html``; diff --git a/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts b/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts index 1ee32055f..b160d5056 100644 --- a/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts +++ b/web/src/pages/stages/authenticator_static/AuthenticatorStaticStageForm.ts @@ -78,7 +78,7 @@ export class AuthenticatorStaticStageForm extends Form }).then(flows => { return flows.results.map(flow => { let selected = this.stage?.configureFlow === flow.pk; - if (!this.stage?.configureFlow && flow.slug === "default-otp-time-configure") { + if (!this.stage?.pk && !this.stage?.configureFlow && flow.slug === "default-otp-time-configure") { selected = true; } return html``; diff --git a/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts b/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts index 4ca56ad86..51b14400f 100644 --- a/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts +++ b/web/src/pages/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts @@ -84,7 +84,7 @@ export class AuthenticatorTOTPStageForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.stage?.configureFlow === flow.pk; - if (!this.stage?.configureFlow && flow.slug === "default-otp-time-configure") { + if (!this.stage?.pk && !this.stage?.configureFlow && flow.slug === "default-otp-time-configure") { selected = true; } return html``; diff --git a/web/src/pages/stages/password/PasswordStageForm.ts b/web/src/pages/stages/password/PasswordStageForm.ts index 38de2f949..149effb44 100644 --- a/web/src/pages/stages/password/PasswordStageForm.ts +++ b/web/src/pages/stages/password/PasswordStageForm.ts @@ -94,7 +94,7 @@ export class PasswordStageForm extends Form { }).then(flows => { return flows.results.map(flow => { let selected = this.stage?.configureFlow === flow.pk; - if (!this.stage?.configureFlow && flow.slug === "default-password-change") { + if (!this.stage?.pk && !this.stage?.configureFlow && flow.slug === "default-password-change") { selected = true; } return html``;