@@ -11,8 +11,15 @@ import { ProfileCard } from '@/elements/ProfileCard';
1111import { BoxIcon } from '@/icons' ;
1212import { Route , Switch } from '@/router' ;
1313
14- import { ConfigureSSOFlowProvider } from './ConfigureSSOContext' ;
15- import { CONFIGURE_SSO_STEPS } from './constants' ;
14+ import { ConfigureSSOFlowProvider , useConfigureSSOFlow } from './ConfigureSSOContext' ;
15+ import {
16+ ConfigureCreateApp ,
17+ ConfigureMapAttributes ,
18+ ConfirmationStep ,
19+ ProvideEmail ,
20+ TestConfigurationStep ,
21+ VerifyDomain ,
22+ } from './steps' ;
1623import { ConfigureSSOWizard } from './wizard' ;
1724
1825const ConfigureSSOInternal = ( ) => {
@@ -117,18 +124,88 @@ const AuthenticatedContent = withCoreUserGuard(() => {
117124 enterpriseConnection = { enterpriseConnection }
118125 isLoading = { isLoadingEnterpriseConnections }
119126 >
120- < ConfigureSSOWizard . Root steps = { CONFIGURE_SSO_STEPS } >
121- < ConfigureSSOWizard . Header />
122- < ConfigureSSOWizard . Content />
123- < ConfigureSSOWizard . Footer />
124- </ ConfigureSSOWizard . Root >
127+ < ConfigureSSOSteps />
125128 </ ConfigureSSOFlowProvider >
126129 </ Col >
127130 </ NavbarContextProvider >
128131 </ ProfileCard . Root >
129132 ) ;
130133} ) ;
131134
135+ /**
136+ * The full ConfigureSSO step tree, declared inline. Each
137+ * `<ConfigureSSOWizard.Step>` is one breadcrumb entry; nested
138+ * `<ConfigureSSOWizard>` blocks declare inner sub-step routing.
139+ *
140+ * Conditional rendering on a step (`{cond && <Step ... />}`) skips
141+ * it from the breadcrumb and from `goNext`/`goPrev` traversal — no
142+ * `shouldSkip` predicate needed
143+ */
144+ const ConfigureSSOSteps = ( ) => {
145+ const { domainAlreadyVerified } = useConfigureSSOFlow ( ) ;
146+
147+ return (
148+ < ConfigureSSOWizard >
149+ { ! domainAlreadyVerified && (
150+ < ConfigureSSOWizard . Step
151+ id = 'verify-email-domain'
152+ path = 'verify-email-domain'
153+ label = 'Verify domain'
154+ >
155+ < ConfigureSSOWizard >
156+ < ConfigureSSOWizard . Step
157+ id = 'provide-email'
158+ path = 'provide-email'
159+ >
160+ < ProvideEmail />
161+ </ ConfigureSSOWizard . Step >
162+ < ConfigureSSOWizard . Step
163+ id = 'verify-domain'
164+ path = 'verify-domain'
165+ >
166+ < VerifyDomain />
167+ </ ConfigureSSOWizard . Step >
168+ </ ConfigureSSOWizard >
169+ </ ConfigureSSOWizard . Step >
170+ ) }
171+ < ConfigureSSOWizard . Step
172+ id = 'configure'
173+ path = 'configure'
174+ label = 'Configure'
175+ >
176+ < ConfigureSSOWizard >
177+ < ConfigureSSOWizard . Step
178+ id = 'create-app'
179+ path = 'create-app'
180+ >
181+ < ConfigureCreateApp />
182+ </ ConfigureSSOWizard . Step >
183+ < ConfigureSSOWizard . Step
184+ id = 'map-attributes'
185+ path = 'map-attributes'
186+ >
187+ < ConfigureMapAttributes />
188+ </ ConfigureSSOWizard . Step >
189+ </ ConfigureSSOWizard >
190+ </ ConfigureSSOWizard . Step >
191+ < ConfigureSSOWizard . Step
192+ id = 'test'
193+ path = 'test'
194+ label = 'Test'
195+ >
196+ < TestConfigurationStep />
197+ </ ConfigureSSOWizard . Step >
198+ < ConfigureSSOWizard . Step
199+ id = 'confirmation'
200+ path = 'confirmation'
201+ label = 'Confirmation'
202+ >
203+ < ConfirmationStep />
204+ </ ConfigureSSOWizard . Step >
205+ </ ConfigureSSOWizard >
206+ ) ;
207+ } ;
208+
132209const OrganizationSidebarSubtitle = ( ) => {
133210 const { organization } = useOrganization ( ) ;
134211
0 commit comments