Skip to content

feat(clerk-js,shared): SignUp email link verification#7745

Open
dstaley wants to merge 6 commits intomainfrom
ds.feat/signals-signup-email-link
Open

feat(clerk-js,shared): SignUp email link verification#7745
dstaley wants to merge 6 commits intomainfrom
ds.feat/signals-signup-email-link

Conversation

@dstaley
Copy link
Member

@dstaley dstaley commented Feb 3, 2026

Description

This PR adds support for email link based verification during sign-up to our new hooks/signal implementation.

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:

Summary by CodeRabbit

  • New Features

    • Add email-link sign-up flow: send an email link and poll until verification completes.
    • Support relative redirect URLs by converting them to absolute URLs for email-link redirects.
    • Expose email-link verification status in the sign-up verification state when available.
  • Tests

    • Add coverage for sending email links, polling outcomes (verified/expired), and redirect URL handling.

@vercel
Copy link

vercel bot commented Feb 3, 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 Feb 4, 2026 5:43pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 923f052

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

This PR includes changesets to release 20 packages
Name Type
@clerk/clerk-js Minor
@clerk/shared Minor
@clerk/react Minor
@clerk/chrome-extension Patch
@clerk/expo Patch
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/backend Patch
@clerk/expo-passkeys Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/localizations Patch
@clerk/msw Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch
@clerk/ui 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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 3, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7745

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 923f052

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Adds email-link verification to SignUpFuture: new type SignUpFutureEmailLinkSendParams; new methods sendEmailLink and waitForEmailLinkVerification on SignUpFuture and SignUpFutureVerifications; an emailLinkVerification getter that reads verification state from URL query params in-browser; sendEmailLink normalizes redirect URLs and posts a prepare_verification with strategy "email_link"; waitForEmailLinkVerification polls until status becomes "verified" or "expired". Tests, shared types, React StateProxy exposures, a changeset, and a bundle size tweak were added.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main feature: adding email link verification support to SignUp. It identifies the affected packages and the core functionality change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

Copy link
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

🤖 Fix all issues with AI agents
In @.changeset/busy-wolves-rush.md:
- Line 7: Update the phrase "email link based verification" to the hyphenated
compound adjective "email-link-based verification" in the changelog text (the
sentence containing "Add support for email link based verification"); search for
that exact phrase and replace it with the hyphenated form to ensure proper
grammar.

'@clerk/react': minor
---

Add support for email link based verification to SignUpFuture
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Hyphenate the compound adjective.

The phrase "email link based" should be hyphenated as "email-link-based" when used as a compound adjective modifying "verification".

✏️ Proposed fix
-Add support for email link based verification to SignUpFuture
+Add support for email-link-based verification to SignUpFuture
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Add support for email link based verification to SignUpFuture
Add support for email-link-based verification to SignUpFuture
🧰 Tools
🪛 LanguageTool

[grammar] ~7-~7: Use a hyphen to join words.
Context: ...': minor --- Add support for email link based verification to SignUpFuture

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In @.changeset/busy-wolves-rush.md at line 7, Update the phrase "email link
based verification" to the hyphenated compound adjective "email-link-based
verification" in the changelog text (the sentence containing "Add support for
email link based verification"); search for that exact phrase and replace it
with the hyphenated form to ensure proper grammar.

}

async sendEmailLink(params: SignUpFutureEmailLinkSendParams): Promise<{ error: ClerkError | null }> {
const { verificationUrl } = params;
Copy link
Member

Choose a reason for hiding this comment

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

Does this need a client-only guard?

Copy link
Member Author

Choose a reason for hiding this comment

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

a what

Copy link
Member

Choose a reason for hiding this comment

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

inBrowser() check

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean, none of the other methods do that so probably no?

.reload()
.then(res => {
const status = res.verifications.emailAddress.status;
if (status === 'verified' || status === 'expired') {
Copy link
Member

Choose a reason for hiding this comment

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

Are these all of the statuses that should short-circuit the poller? Saw these also 'failed' | 'client_mismatch'

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, the existing createEmailLinkFlow only checks for those statuses https://github.com/clerk/javascript/blob/main/packages/clerk-js/src/core/resources/SignIn.ts#L285

I think (maybe?) those statuses are possible in the __clerk_status parameter, not the verifications property on the SignUp resource.

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