sso.tsx51 lines · main
1import { useParams } from 'common'
2import {
3 PageHeader,
4 PageHeaderDescription,
5 PageHeaderMeta,
6 PageHeaderSummary,
7 PageHeaderTitle,
8} from 'ui-patterns/PageHeader'
9
10import { SSOConfig } from '@/components/interfaces/Organization/SSO/SSOConfig'
11import { DefaultLayout } from '@/components/layouts/DefaultLayout'
12import OrganizationLayout from '@/components/layouts/OrganizationLayout'
13import { OrganizationSettingsLayout } from '@/components/layouts/ProjectLayout/OrganizationSettingsLayout'
14import { UnknownInterface } from '@/components/ui/UnknownInterface'
15import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled'
16import type { NextPageWithLayout } from '@/types'
17
18const OrgSSO: NextPageWithLayout = () => {
19 const { slug } = useParams()
20 const showSsoSettings = useIsFeatureEnabled('organization:show_sso_settings')
21
22 if (!showSsoSettings) {
23 return <UnknownInterface urlBack={`/org/${slug}/general`} />
24 }
25
26 return (
27 <>
28 <PageHeader size="small">
29 <PageHeaderMeta>
30 <PageHeaderSummary>
31 <PageHeaderTitle>Single Sign-On</PageHeaderTitle>
32 <PageHeaderDescription>
33 SAML SSO configuration and domain access controls
34 </PageHeaderDescription>
35 </PageHeaderSummary>
36 </PageHeaderMeta>
37 </PageHeader>
38 <SSOConfig />
39 </>
40 )
41}
42
43OrgSSO.getLayout = (page) => (
44 <DefaultLayout>
45 <OrganizationLayout title="SSO">
46 <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout>
47 </OrganizationLayout>
48 </DefaultLayout>
49)
50
51export default OrgSSO