Skip to content

chore(ui): Layer architecture for configure steps per IdP and protocol#8651

Merged
LauraBeatris merged 8 commits into
mainfrom
laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions
May 28, 2026
Merged

chore(ui): Layer architecture for configure steps per IdP and protocol#8651
LauraBeatris merged 8 commits into
mainfrom
laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions

Conversation

@LauraBeatris
Copy link
Copy Markdown
Member

@LauraBeatris LauraBeatris commented May 26, 2026

Description

Introduces new architecture for adding configuration steps per IdP and protocol, making it more flexible to add Microsoft Entra + Google Workspace for SAML, and later OpenID connect.

Now, each protocol has it's folder within the provider types, and each provider should have it's inner steps created within a module, which allows for flexibility when composing the UI.

How to add a new SAML provider

  1. Update the ProviderType union
  2. Once the union gets updated, then it'll require to update the step mapper within ConfigureStep/index.tsx
  3. Implement the steps component for that identity provider according to it's instructions

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@LauraBeatris LauraBeatris self-assigned this May 26, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

🦋 Changeset detected

Latest commit: 8be9b23

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

This PR includes changesets to release 20 packages
Name Type
@clerk/localizations Patch
@clerk/shared Patch
@clerk/ui Patch
@clerk/react Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/expo-passkeys Patch
@clerk/expo Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/vue Patch

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 28, 2026 2:48pm

Request Review

@LauraBeatris LauraBeatris changed the title chore(ui): Layer infrastructure for configure steps per IdP and protocol chore(ui): Layer architecture for configure steps per IdP and protocol May 26, 2026
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from 80e9446 to 8b20562 Compare May 26, 2026 19:25
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from e2635af to fc19027 Compare May 26, 2026 19:56
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from fc19027 to 1f2eec2 Compare May 26, 2026 20:01
@LauraBeatris LauraBeatris marked this pull request as ready for review May 26, 2026 20:01
@LauraBeatris LauraBeatris requested review from a team and iagodahlem May 26, 2026 20:02
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from 1f2eec2 to c1282bf Compare May 26, 2026 20:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR refactors the ConfigureSSO SAML wizard architecture into provider-specific, step-based flows and updates localization and types accordingly. It adds shared UI components AttributeMappingTable and IdentityProviderMetadataForm, implements SamlOktaConfigureSteps and SamlCustomConfigureSteps composed of create-app, attribute-mapping, assign-users, and identity-provider-metadata steps, introduces a provider-dispatching ConfigureStep entry, and extracts a shared InnerStepCounter used by VerifyDomainStep.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • clerk/javascript#8553: Implements segmented metadata URL vs manual IdP metadata flow and related localization keys used here.
  • clerk/javascript#8535: Earlier Okta Configure step UI and localization work that this PR refactors into the step-based hierarchy.
  • clerk/javascript#8586: Overlaps changes to SAML attribute-mapping UI and localization keys.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main architectural change: introducing a layered architecture for configure steps organized by IdP and protocol.
Description check ✅ Passed The description clearly explains the architectural refactoring, provides context on use cases, and includes implementation guidance for adding new providers.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch 2 times, most recently from f1cafb9 to df44a2a Compare May 26, 2026 20:13
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from df44a2a to c43e632 Compare May 27, 2026 15:15
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8651

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 8be9b23

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

1403-1573: ⚡ Quick win

Add a type-level regression check for the new localization schema.

This rewires a large public key surface, but no coverage was updated in the supplied diff. A compile-time fixture asserting the default SSO localization resource still satisfies this configureSSO.configureStep shape would catch missing or renamed keys early.

As per coding guidelines, "If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."

🤖 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/localization.ts` around lines 1403 - 1573, Add a
compile-time regression check that imports the default SSO/localization resource
and asserts it still satisfies the configureSSO.configureStep shape: create a
TypeScript-only test (no runtime assertions) that imports the type for
configureSSO.configureStep and the default localization object and then do a
type-level assertion (e.g., const _check: typeof
defaultLocalization.configureSSO.configureStep = {} as typeof
configureSSO.configureStep or using the TS 4.9 `satisfies` operator) so the
build fails if any keys are missing/renamed; ensure the test references
configureSSO.configureStep and the default SSO localization export and is added
to the test suite/CI.
🤖 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.

Nitpick comments:
In `@packages/shared/src/types/localization.ts`:
- Around line 1403-1573: Add a compile-time regression check that imports the
default SSO/localization resource and asserts it still satisfies the
configureSSO.configureStep shape: create a TypeScript-only test (no runtime
assertions) that imports the type for configureSSO.configureStep and the default
localization object and then do a type-level assertion (e.g., const _check:
typeof defaultLocalization.configureSSO.configureStep = {} as typeof
configureSSO.configureStep or using the TS 4.9 `satisfies` operator) so the
build fails if any keys are missing/renamed; ensure the test references
configureSSO.configureStep and the default SSO localization export and is added
to the test suite/CI.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 23bb4169-5d71-4bc6-bc43-572d98d5cf04

📥 Commits

Reviewing files that changed from the base of the PR and between df44a2a and c43e632.

📒 Files selected for processing (11)
  • packages/localizations/src/en-US.ts
  • packages/shared/src/types/localization.ts
  • packages/ui/src/components/ConfigureSSO/elements/Wizard/InnerStepCounter.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/index.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlCustomConfigureSteps.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlOktaConfigureSteps.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/AttributeMappingTable.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/IdentityProviderMetadataForm.tsx
  • packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
  • packages/ui/src/components/ConfigureSSO/steps/configureStepTranslations.ts
💤 Files with no reviewable changes (2)
  • packages/ui/src/components/ConfigureSSO/steps/configureStepTranslations.ts
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep.tsx
✅ Files skipped from review due to trivial changes (1)
  • packages/ui/src/components/ConfigureSSO/elements/Wizard/InnerStepCounter.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/index.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlCustomConfigureSteps.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/AttributeMappingTable.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlOktaConfigureSteps.tsx
  • packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/IdentityProviderMetadataForm.tsx
  • packages/localizations/src/en-US.ts

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from 07db24a to 70e7f5a Compare May 27, 2026 15:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

API Changes Report

Generated by snapi on 2026-05-28T14:50:45.228Z

Summary

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

Warning
1 breaking change(s) detected - Major version bump required

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


@clerk/shared

Current version: 4.14.0
Recommended bump: MAJOR → 5.0.0

Subpath ./types

🔴 Breaking Changes (1)

Changed: __internal_LocalizationResource
Diff (before: 1712 lines, after: 1680 lines). Click to expand.
// ... 1307 unchanged lines elided ...
        };
      };
      configureStep: {
-       attributeMapping: {
-         title: LocalizationValue;
-         paragraph: LocalizationValue;
-         columns: {
-           attribute: LocalizationValue;
-           claimName: LocalizationValue;
-           claimValue: LocalizationValue;
-         };
-         badges: {
-           required: LocalizationValue;
-           optional: LocalizationValue;
-         };
-         rows: {
-           email: {
-             attribute: LocalizationValue;
-             claim: LocalizationValue;
-           };
-           firstName: {
-             attribute: LocalizationValue;
-             claim: LocalizationValue;
-           };
-           lastName: {
-             attribute: LocalizationValue;
-             claim: LocalizationValue;
-           };
-         };
-       };
-       samlOkta: {
-         headerTitle: LocalizationValue;
-         attributeMapping: {
// ... 157 more lines elided ...
-         metadataUrl: {
-           headerSubtitle: LocalizationValue;
-           label: LocalizationValue;
-           placeholder: LocalizationValue;
-           description: LocalizationValue;
-         };
-         modes: {
-           ariaLabel: LocalizationValue;
-           metadataUrl: LocalizationValue;
-           manual: LocalizationValue;
-         };
-         submitSamlConfig: {
-           title: LocalizationValue;
-         };
-         manual: {
-           description: LocalizationValue;
-           signOnUrl: {
-             label: LocalizationValue;
-             placeholder: LocalizationValue;
-           };
-           issuer: {
-             label: LocalizationValue;
-             placeholder: LocalizationValue;
-           };
-           signingCertificate: {
-             label: LocalizationValue;
-             uploadFile: LocalizationValue;
-             replaceFile: LocalizationValue;
-             removeFile: LocalizationValue;
-             fileUploaded: LocalizationValue;
+       attributeMappingTable: {
+         badges: {
+           required: LocalizationValue;
+           optional: LocalizationValue;
+         };
+       };
+       samlOkta: {
+         mainHeaderTitle: LocalizationValue;
+         createAppStep: {
+           headerSubtitle: LocalizationValue;
+           createAppInstructions: {
+             title: LocalizationValue;
+             step1: LocalizationValue;
+             step2: LocalizationValue;
+             step3: LocalizationValue;
+             step4: LocalizationValue;
+             step5: LocalizationValue;
+           };
+           serviceProviderInstructions: {
+             title: LocalizationValue;
+             paragraph1: LocalizationValue;
+             paragraph2: LocalizationValue;
+             serviceProviderFields: {
+               acsUrl: {
+                 label: LocalizationValue;
+               };
+               spEntityId: {
+                 label: LocalizationValue;
+               };
+             };
// ... 125 more lines elided ...
+         identityProviderMetadataStep: {
+           headerSubtitle: LocalizationValue;
+           modes: {
+             title: LocalizationValue;
+             ariaLabel: LocalizationValue;
+             metadataUrl: LocalizationValue;
+             manual: LocalizationValue;
+           };
+           metadataUrl: {
+             label: LocalizationValue;
+             placeholder: LocalizationValue;
+             description: LocalizationValue;
+           };
+           manual: {
+             description: LocalizationValue;
+             signOnUrl: {
+               label: LocalizationValue;
+               placeholder: LocalizationValue;
+             };
+             issuer: {
+               label: LocalizationValue;
+               placeholder: LocalizationValue;
+             };
+             signingCertificate: {
+               label: LocalizationValue;
+               uploadFile: LocalizationValue;
+               replaceFile: LocalizationValue;
+               removeFile: LocalizationValue;
+               fileUploaded: LocalizationValue;
+             };
            };
          };
        };
// ... 182 unchanged lines elided ...

Static analyzer: Breaking change in type alias __internal_LocalizationResource: Type changed: {locale:string;maintenanceMode:LocalizationValue;roles:{[r:string]:LocalizationValue;};socialButtonsBlockButton:Localiz…{locale:string;maintenanceMode:LocalizationValue;roles:{[r:string]:LocalizationValue;};socialButtonsBlockButton:Localiz…

🤖 AI review (confirmed) (85%): The configureStep subtree within __internal_LocalizationResource was significantly restructured: the baseline had flat properties like attributeMapping, samlOkta.headerTitle, samlOkta.attributeMapping, samlOkta.spFields, samlOkta.createApp, etc., while the current version reorganized them into step-based sub-objects (attributeMappingTable, samlOkta.mainHeaderTitle, samlOkta.createAppStep, samlOkta.attributeMappingStep, samlOkta.assignUsersStep, samlOkta.identityProviderMetadataStep, and similarly for samlCustom). Consumers providing custom localization objects implementing this type would fail to compile against the new shape.

Migration: Update any custom localization objects that implement __internal_LocalizationResource.configureSSO.configureStep to use the new step-based structure (e.g., samlOkta.createAppStep, samlOkta.attributeMappingStep, samlOkta.identityProviderMetadataStep) instead of the old flat structure.


Report generated by snapi

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from f72b9a6 to 2ff9888 Compare May 27, 2026 20:58
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from 2ff9888 to 443acc7 Compare May 27, 2026 21:19
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from 21ec94d to 5d10b87 Compare May 27, 2026 22:20
@LauraBeatris LauraBeatris enabled auto-merge (squash) May 27, 2026 22:28
@LauraBeatris LauraBeatris disabled auto-merge May 27, 2026 22:29
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from 5d10b87 to aa90ec7 Compare May 27, 2026 22:32
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch from aa90ec7 to 8be9b23 Compare May 28, 2026 14:48
@LauraBeatris LauraBeatris merged commit c3df67a into main May 28, 2026
44 of 45 checks passed
@LauraBeatris LauraBeatris deleted the laura/orgs-1596-sdk-introduce-module-structure-per-idp-specific-instructions branch May 28, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants