From 18e391cc9e9adf2a03665ef73874eea5a2eee80f Mon Sep 17 00:00:00 2001 From: Nicolas Lopes Date: Mon, 20 Jul 2026 15:24:26 -0300 Subject: [PATCH 1/2] feat(ui): add experimental flag to gate the OIDC self-serve flow --- .changeset/empty-ducks-tease.md | 2 ++ packages/shared/src/types/clerk.ts | 4 ++++ .../ConfigureSSO/ConfigureSSOContext.tsx | 14 +++++++++++--- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .changeset/empty-ducks-tease.md diff --git a/.changeset/empty-ducks-tease.md b/.changeset/empty-ducks-tease.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/empty-ducks-tease.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/shared/src/types/clerk.ts b/packages/shared/src/types/clerk.ts index c9dda420029..045f2725cd5 100644 --- a/packages/shared/src/types/clerk.ts +++ b/packages/shared/src/types/clerk.ts @@ -1464,6 +1464,10 @@ export type ClerkOptions = ClerkOptionsNavigation & * directly with the provided Clerk instance. Used by React Native / Expo. */ runtimeEnvironment: 'headless'; + /** + * Temporary flag that gates the self-serve OIDC flow in ``. Remove once the self-serve OIDC flow reaches GA. + */ + oidcSelfServe: boolean; }, Record >; diff --git a/packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx b/packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx index 21e4f2cadeb..156fc15eeed 100644 --- a/packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx +++ b/packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx @@ -1,6 +1,8 @@ import type { EnterpriseConnectionResource, OrganizationDomainResource } from '@clerk/shared/types'; import React, { type PropsWithChildren } from 'react'; +import { useOptions } from '@/contexts'; + import type { OrganizationEnterpriseConnection } from './domain/organizationEnterpriseConnection'; import type { EnterpriseConnectionMutations, @@ -11,9 +13,9 @@ import type { export type { OrganizationDomainMutations }; /** - * Shared state for the ConfigureSSO wizard, persisted across steps. Everything - * is sourced from the umbrella `useOrganizationEnterpriseConnection` hook one - * level up, so the context never observes a loading state and the steps read + * Shared state for the ConfigureSSO wizard, persisted across steps. Connection + * state is sourced from the umbrella `useOrganizationEnterpriseConnection` hook + * one level up, so the context never observes a loading state and the steps read * display gates / mutations from a single place instead of re-deriving. */ export interface ConfigureSSOData { @@ -26,6 +28,8 @@ export interface ConfigureSSOData { testRuns: TestRunsView; organizationDomains: OrganizationDomainResource[] | undefined; onExit?: () => void; + /** Temporary gate for the self-serve OIDC flow; remove at OIDC GA. */ + isOIDCFlowEnabled: boolean; } interface ConfigureSSOProviderProps { @@ -53,6 +57,8 @@ export const ConfigureSSOProvider = ({ onExit, children, }: PropsWithChildren): JSX.Element => { + const isOIDCFlowEnabled = useOptions().experimental?.oidcSelfServe ?? false; + const value = React.useMemo( () => ({ contentRef, @@ -63,6 +69,7 @@ export const ConfigureSSOProvider = ({ enterpriseConnectionMutations, organizationDomainMutations, onExit, + isOIDCFlowEnabled, }), [ contentRef, @@ -73,6 +80,7 @@ export const ConfigureSSOProvider = ({ organizationDomains, enterpriseConnection, onExit, + isOIDCFlowEnabled, ], ); From d148e4f04a1897acd62d629611aa881a712ba3db Mon Sep 17 00:00:00 2001 From: Nicolas Lopes Date: Mon, 20 Jul 2026 16:15:13 -0300 Subject: [PATCH 2/2] chore(release): add changeset for OIDC self-serve flag --- .changeset/empty-ducks-tease.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.changeset/empty-ducks-tease.md b/.changeset/empty-ducks-tease.md index a845151cc84..833e43fa780 100644 --- a/.changeset/empty-ducks-tease.md +++ b/.changeset/empty-ducks-tease.md @@ -1,2 +1,6 @@ --- +"@clerk/shared": patch +"@clerk/ui": patch --- + +Add an experimental `oidcSelfServe` option to enable the self-serve OIDC configuration flow in ``.