Skip to content

chore(ui,shared,localizations): Add verify/add email address step to <ConfigureSSO />#8520

Open
LauraBeatris wants to merge 7 commits into
mainfrom
laura/orgs-1455-configuresso-addverify-email-address-step
Open

chore(ui,shared,localizations): Add verify/add email address step to <ConfigureSSO />#8520
LauraBeatris wants to merge 7 commits into
mainfrom
laura/orgs-1455-configuresso-addverify-email-address-step

Conversation

@LauraBeatris
Copy link
Copy Markdown
Member

@LauraBeatris LauraBeatris commented May 11, 2026

Description

  • Handles warning when there's already a connection created for the given domain when changing to an organization context
  • Handles adding an primary email address when user account is created with username/phone as identifiers
  • Handles verifying email address if not performed previously via sign-in/sign-up

Add + verify

CleanShot.2026-05-11.at.15.55.03.mp4

Verify only

CleanShot.2026-05-11.at.16.06.36.mp4

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 11, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

🦋 Changeset detected

Latest commit: 76fc187

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/clerk-js Patch
@clerk/shared Patch
@clerk/ui Patch
@clerk/react Patch
@clerk/chrome-extension Patch
@clerk/expo Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys 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 11, 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 12, 2026 4:48pm

Request Review

@LauraBeatris LauraBeatris changed the title chore(ui): Add verify/add email address step to <ConfigureSSO /> chore(ui,shared,localizations): Add verify/add email address step to <ConfigureSSO /> May 11, 2026
@LauraBeatris
Copy link
Copy Markdown
Member Author

I'll add unit tests once #8515 gets merged since it introduces the spec over there

@LauraBeatris LauraBeatris force-pushed the laura/orgs-1455-configuresso-addverify-email-address-step branch from 9c16c94 to 367857b Compare May 11, 2026 19:07
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1455-configuresso-addverify-email-address-step branch from 367857b to 53e04c8 Compare May 11, 2026 19:12
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1455-configuresso-addverify-email-address-step branch from 53e04c8 to d27cc13 Compare May 11, 2026 19:14
@LauraBeatris LauraBeatris requested review from a team and iagodahlem May 11, 2026 19:14
@LauraBeatris LauraBeatris marked this pull request as ready for review May 11, 2026 19:15
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 11, 2026

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 76fc187

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 26d78517-5625-4ec2-937f-8262c238ae7e

📥 Commits

Reviewing files that changed from the base of the PR and between 3e2e08b and 76fc187.

📒 Files selected for processing (1)
  • packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx

📝 Walkthrough

Walkthrough

This PR adds a new email verification step to the experimental ConfigureSSO flow. The change spans multi-language localization strings across 40+ supported languages, TypeScript type definitions for the new localization structure, React components for email entry and OTP verification, and supporting assets. The implementation detects when the configured domain is already taken by another organization and provides appropriate early-exit messaging. The feature is broken into three sub-components: ProvideEmailStep for email collection, EnterVerificationCodeStep for OTP-based verification, and EmailAlreadyVerified for displaying verified-state confirmation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • clerk/javascript#8427: Extends ConfigureSSO scaffolding that was introduced by the retrieved PR, building on the same localization and type structures.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding a verify/add email address step to the ConfigureSSO component, which directly correlates with the changeset.
Description check ✅ Passed The description is directly related to the changeset, detailing the three key handling aspects (domain connection warning, email address addition, email verification) and referencing UI flows that correspond to the code changes.
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.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx`:
- Around line 223-227: The Continue button currently calls goNext() directly
(Step.Footer.Continue onClick={() => goNext()}) which skips createEmailAddress()
and causes EnterVerificationCodeStep to receive no emailToVerify; change the
onClick to call handleSubmit (or the wrapper that executes createEmailAddress()
then advances) so the add+verify flow runs createEmailAddress() before moving
forward, ensuring emailToVerify is set for EnterVerificationCodeStep and
preserving the existing isLoading/isDisabled checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 62663121-c78d-41df-9d3f-35a4875f7f1a

📥 Commits

Reviewing files that changed from the base of the PR and between 0f8aed2 and d27cc13.

⛔ Files ignored due to path filters (1)
  • packages/ui/src/icons/duotone-at-symbol.svg is excluded by !**/*.svg
📒 Files selected for processing (53)
  • .changeset/thirty-cups-guess.md
  • packages/localizations/src/ar-SA.ts
  • packages/localizations/src/be-BY.ts
  • packages/localizations/src/bg-BG.ts
  • packages/localizations/src/bn-IN.ts
  • packages/localizations/src/ca-ES.ts
  • packages/localizations/src/cs-CZ.ts
  • packages/localizations/src/da-DK.ts
  • packages/localizations/src/de-DE.ts
  • packages/localizations/src/el-GR.ts
  • packages/localizations/src/en-GB.ts
  • packages/localizations/src/en-US.ts
  • packages/localizations/src/es-CR.ts
  • packages/localizations/src/es-ES.ts
  • packages/localizations/src/es-MX.ts
  • packages/localizations/src/es-UY.ts
  • packages/localizations/src/fa-IR.ts
  • packages/localizations/src/fi-FI.ts
  • packages/localizations/src/fr-FR.ts
  • packages/localizations/src/he-IL.ts
  • packages/localizations/src/hi-IN.ts
  • packages/localizations/src/hr-HR.ts
  • packages/localizations/src/hu-HU.ts
  • packages/localizations/src/id-ID.ts
  • packages/localizations/src/is-IS.ts
  • packages/localizations/src/it-IT.ts
  • packages/localizations/src/ja-JP.ts
  • packages/localizations/src/kk-KZ.ts
  • packages/localizations/src/ko-KR.ts
  • packages/localizations/src/mn-MN.ts
  • packages/localizations/src/ms-MY.ts
  • packages/localizations/src/nb-NO.ts
  • packages/localizations/src/nl-BE.ts
  • packages/localizations/src/nl-NL.ts
  • packages/localizations/src/pl-PL.ts
  • packages/localizations/src/pt-BR.ts
  • packages/localizations/src/pt-PT.ts
  • packages/localizations/src/ro-RO.ts
  • packages/localizations/src/ru-RU.ts
  • packages/localizations/src/sk-SK.ts
  • packages/localizations/src/sr-RS.ts
  • packages/localizations/src/sv-SE.ts
  • packages/localizations/src/ta-IN.ts
  • packages/localizations/src/te-IN.ts
  • packages/localizations/src/th-TH.ts
  • packages/localizations/src/tr-TR.ts
  • packages/localizations/src/uk-UA.ts
  • packages/localizations/src/vi-VN.ts
  • packages/localizations/src/zh-CN.ts
  • packages/localizations/src/zh-TW.ts
  • packages/shared/src/types/localization.ts
  • packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
  • packages/ui/src/icons/index.ts

Comment thread packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1455-configuresso-addverify-email-address-step branch from d27cc13 to 0b25a46 Compare May 11, 2026 19:21
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.

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx (1)

229-232: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Route the Continue CTA through handleSubmit.

This still skips createEmailAddress() and advances straight to the OTP step. In the add+verify path, that can leave emailToVerify unset, so EnterVerificationCodeStep returns null and the flow dead-ends. As per coding guidelines, "Use proper form submission handling in React components".

Suggested fix
         <Step.Footer.Continue
-          onClick={() => goNext()}
+          onClick={() => {
+            void handleSubmit();
+          }}
           isLoading={card.isLoading}
           isDisabled={!canSubmit || card.isLoading}
         />
🤖 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/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx` around
lines 229 - 232, The Continue button currently calls goNext() directly which
skips form submission and createEmailAddress(), leaving emailToVerify unset and
causing EnterVerificationCodeStep to return null; change the
Step.Footer.Continue onClick to call handleSubmit (the existing form submit
handler) instead of goNext so the form validates and createEmailAddress() runs
before advancing, keep the isLoading and isDisabled props (card.isLoading and
!canSubmit || card.isLoading) as-is, and ensure handleSubmit ultimately calls
goNext() only after createEmailAddress() completes successfully.
🤖 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.

Inline comments:
In `@packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx`:
- Line 247: The Previous button in VerifyDomainStep is currently always disabled
(using useWizard's goPrev) which prevents returning to the email-entry step;
update the disable logic so the back action is only disabled when this step is
actually the first step—use the wizard state (e.g., an isFirst or
currentStep/index value from useWizard or the wizard context) to conditionally
enable goPrev, and apply the same change in the other occurrence around lines
335-343 so users can recover from a mistyped email by navigating back to the
email-entry component instead of being stuck on the OTP screen.

---

Duplicate comments:
In `@packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx`:
- Around line 229-232: The Continue button currently calls goNext() directly
which skips form submission and createEmailAddress(), leaving emailToVerify
unset and causing EnterVerificationCodeStep to return null; change the
Step.Footer.Continue onClick to call handleSubmit (the existing form submit
handler) instead of goNext so the form validates and createEmailAddress() runs
before advancing, keep the isLoading and isDisabled props (card.isLoading and
!canSubmit || card.isLoading) as-is, and ensure handleSubmit ultimately calls
goNext() only after createEmailAddress() completes successfully.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro

Run ID: 1004fa64-a006-455f-9ec2-98e4c515e64d

📥 Commits

Reviewing files that changed from the base of the PR and between d27cc13 and 0b25a46.

📒 Files selected for processing (2)
  • .changeset/thirty-cups-guess.md
  • packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
✅ Files skipped from review due to trivial changes (1)
  • .changeset/thirty-cups-guess.md

Comment thread packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx Outdated
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1455-configuresso-addverify-email-address-step branch from 0b25a46 to f5501fd Compare May 12, 2026 14:49
@LauraBeatris LauraBeatris force-pushed the laura/orgs-1455-configuresso-addverify-email-address-step branch from f6c0ce7 to 3e2e08b Compare May 12, 2026 15:05
@LauraBeatris
Copy link
Copy Markdown
Member Author

We should add unit tests for this step once we have the select provider screen

/>
<Col
gap={1}
sx={t => ({ textAlign: 'center', maxWidth: t.sizes.$66 })}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you think of using the maxWidth from the MissingManageEnterpriseConnectionsPermission step? Might look a bit better.

/>
</Col>
</Col>
</Step>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We are just missing the footer and the Step.Header here as per the design.

>
<Heading
textVariant='h1'
sx={t => ({ fontSize: t.fontSizes.$lg })}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we could add a textWrap: balance here too.

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