Skip to content

feat(ui): add experimental flag to gate the OIDC self-serve flow#9102

Open
iagodahlem wants to merge 1 commit into
mainfrom
iago/orgs-1741-oidc-flag-prop
Open

feat(ui): add experimental flag to gate the OIDC self-serve flow#9102
iagodahlem wants to merge 1 commit into
mainfrom
iago/orgs-1741-oidc-flag-prop

Conversation

@iagodahlem

@iagodahlem iagodahlem commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an experimental oidcSelfServe flag to the ClerkProvider experimental options, laying the groundwork to gate a forthcoming OIDC self-serve configuration flow in <ConfigureSSO />.

  • Opt in via <ClerkProvider experimental={{ oidcSelfServe: true }} /> (default off).
  • Surfaced to the ConfigureSSO wizard and all of its steps as isOIDCFlowEnabled via useConfigureSSO().
  • No user-facing surface is gated yet — the OIDC provider path lands in a follow-up PR. The flag lives in the SemVer-exempt experimental namespace, so there is no public API impact.

ORGS-1741

Summary by CodeRabbit

  • New Features
    • Added support for a new experimental self-serve OIDC option in SSO configuration.
    • The SSO setup flow now recognizes and passes through an additional enabled/disabled state for this experience.
  • Chores
    • Included a changeset entry to track this update.

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 7, 2026 6:56pm
swingset Ready Ready Preview, Comment Jul 7, 2026 6:56pm

Request Review

@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f3bd95c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR introduces a new oidcSelfServe experimental boolean flag in ClerkOptions, and propagates it into the ConfigureSSO context as isOIDCFlowEnabled, computed via useOptions() and exposed through the memoized context value. A changeset file is also added.

Changes

OIDC self-serve flag

Layer / File(s) Summary
Experimental flag type
packages/shared/src/types/clerk.ts
Adds oidcSelfServe: boolean to ClerkOptions.experimental with documentation.
ConfigureSSO context wiring
packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx
Imports useOptions, extends ConfigureSSOData with isOIDCFlowEnabled, computes it from experimental?.oidcSelfServe (default false), and includes it in the memoized context value and dependency array; comment reworded.
Changeset entry
.changeset/empty-ducks-tease.md
Adds a new changeset file documenting the change.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

A tiny flag, hopped into view,
oidcSelfServe, shiny and new,
Through context it quietly flows,
Gating a flow that self-serve knows,
One more carrot for the changelog stew! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding an experimental flag to gate the OIDC self-serve flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9102

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9102

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9102

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9102

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9102

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9102

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9102

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9102

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9102

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9102

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9102

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9102

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9102

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9102

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9102

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9102

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9102

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9102

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9102

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9102

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9102

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9102

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9102

commit: f3bd95c

@iagodahlem iagodahlem marked this pull request as ready for review July 7, 2026 19:08
@iagodahlem iagodahlem requested a review from LauraBeatris July 7, 2026 19:08
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-07T19:11:57.504Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 1
🔴 Breaking changes 0
🟡 Non-breaking changes 1
🟢 Additions 0

🤖 This report was reviewed by claude-sonnet-4-6.


@clerk/shared

Current version: 4.24.0
Recommended bump: MINOR → 4.25.0

Subpath ./types

🟡 Non-breaking Changes (1)

Modified: ClerkOptions
// ... 26 unchanged lines elided ...
      rethrowOfflineNetworkErrors: boolean;
      commerce: boolean;
      runtimeEnvironment: 'headless';
+     oidcSelfServe: boolean;
    }, Record<string, any>>;
    __internal_keyless_claimKeylessApplicationUrl?: string;
    __internal_keyless_copyInstanceKeysUrl?: string;
// ... 4 unchanged lines elided ...

Static analyzer: Breaking change in type alias ClerkOptions: Type changed: import("@clerk/shared").AfterMultiSessionSingleSignOutUrl&import("@clerk/shared").AfterSignOutUrl&import("@clerk/shared…import("@clerk/shared").AfterMultiSessionSingleSignOutUrl&import("@clerk/shared").AfterSignOutUrl&import("@clerk/shared…

🤖 AI review (reclassified as non-breaking) (97%): The only change is adding oidcSelfServe: boolean to the experimental field's object literal inside an Autocomplete<..., Record<string, any>> union. Per rule 14, Autocomplete<T, Record<string, any>> includes an absorbing arm (Record<string, any>) that already accepts any object, so adding a new literal arm merely improves autocomplete suggestions without changing the assignable set in either input or output direction.


Report generated by Break Check

Last ran on f3bd95c.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.changeset/empty-ducks-tease.md (1)

1-3: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add a real changeset entry for this PR.

This file is still the empty placeholder form, which only fits docs/tooling-only or otherwise release-free changes. Since this PR adds code in the experimental Clerk options / ConfigureSSO path, please include the affected package bump(s) and summary so the release/changelog is generated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/empty-ducks-tease.md around lines 1 - 3, The changeset file is
still the empty placeholder, but this PR introduces a code change in the
experimental Clerk options / ConfigureSSO path, so it needs a real release
entry. Update the changeset content to include a short summary of the change and
the appropriate package bump(s), using the existing changeset file as the place
to document the impacted package(s) so the changelog can be generated.

Sources: Coding guidelines, Learnings

🧹 Nitpick comments (1)
packages/shared/src/types/clerk.ts (1)

1484-1487: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

New experimental flag is well-documented; consider Docs-team review + @default tag.

The JSDoc clearly explains the purpose and removal plan, which is good. Two small notes:

  • Sibling flag persistClient documents its default via @default true; consider adding @default false here for consistency, since the PR objective states the flag is off by default.
  • Since this JSDoc is on an exported ClerkOptions type that Clerk Docs generates reference content from, the Docs team may want to review this addition (even though it lives under the SemVer-exempt experimental namespace).
📝 Optional doc tweak
         /**
          * Temporary flag that gates the self-serve OIDC flow in `<ConfigureSSO />`. Remove once the self-serve OIDC flow reaches GA.
+         * `@default` false
          */
         oidcSelfServe: boolean;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/shared/src/types/clerk.ts` around lines 1484 - 1487, The new
ClerkOptions experimental flag oidcSelfServe is documented well, but it should
be updated for consistency with sibling flags by adding the `@default` false JSDoc
tag to reflect that it is off by default. Since this is an exported type that
feeds generated reference docs, have the Clerk Docs team review the addition as
part of the change, especially within the experimental namespace.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.changeset/empty-ducks-tease.md:
- Around line 1-3: The changeset file is still the empty placeholder, but this
PR introduces a code change in the experimental Clerk options / ConfigureSSO
path, so it needs a real release entry. Update the changeset content to include
a short summary of the change and the appropriate package bump(s), using the
existing changeset file as the place to document the impacted package(s) so the
changelog can be generated.

---

Nitpick comments:
In `@packages/shared/src/types/clerk.ts`:
- Around line 1484-1487: The new ClerkOptions experimental flag oidcSelfServe is
documented well, but it should be updated for consistency with sibling flags by
adding the `@default` false JSDoc tag to reflect that it is off by default. Since
this is an exported type that feeds generated reference docs, have the Clerk
Docs team review the addition as part of the change, especially within the
experimental namespace.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e7f67db-2260-4329-b791-610053a1f03c

📥 Commits

Reviewing files that changed from the base of the PR and between 409cdae and f3bd95c.

📒 Files selected for processing (3)
  • .changeset/empty-ducks-tease.md
  • packages/shared/src/types/clerk.ts
  • packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx

@@ -0,0 +1,2 @@
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we still need to include the version changes here to bump the packages and build it

Let's write that it's an internal change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants