') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); fix(clerk-js): Backport forgot password from sign-in start by jescalan · Pull Request #9224 · clerk/javascript · GitHub
Skip to content

fix(clerk-js): Backport forgot password from sign-in start - #9224

Merged
wobsoriano merged 2 commits into
release/core-2from
backport/8733-forgot-password-core-2
Jul 23, 2026
Merged

fix(clerk-js): Backport forgot password from sign-in start#9224
wobsoriano merged 2 commits into
release/core-2from
backport/8733-forgot-password-core-2

Conversation

@jescalan

@jescalanjescalan commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Backports #8733 to release/core-2.

When strict user enumeration protection is enabled and a password manager fills the hidden instant-password field, an incorrect password keeps the user on SignInStart. Core 2 has no password-recovery action in that state, so users have to discover that clearing the password and continuing with only the identifier reveals the recovery flow.

What changed

  • Show a Forgot password? action whenever the instant-password field is visible.
  • Create an identifier-only sign-in and navigate to factor one with a temporary reset-password intent.
  • Open the reset-password alternatives directly, falling back to Use another method when no reset factor exists.
  • Clear the temporary intent when leaving the alternatives screen.
  • Add regression coverage for the reset-factor, no-reset-factor, and empty-identifier paths.

Core 2 adaptation

  • Ports the reviewed packages/ui fix into Core 2's bundled ClerkJS UI.
  • Applies the changeset to @clerk/clerk-js.
  • Deliberately leaves unrelated post-Core-2 sign-in behavior out of the backport.

Original fix: #8733

@changeset-bot

changeset-botBot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a032a0a

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

This PR includes changesets to release 3 packages
NameType
@clerk/clerk-jsPatch
@clerk/chrome-extensionPatch
@clerk/clerk-expoPatch

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

vercelBot commented Jul 23, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
clerk-js-sandboxReadyReadyPreview, CommentJul 23, 2026 5:18pm
swingsetErrorErrorJul 23, 2026 5:18pm

Request Review

@coderabbitai

coderabbitaiBot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d1693f87-b2b6-4f97-bcbb-3865d1c8c73b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport/8733-forgot-password-core-2

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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment threadpackages/clerk-js/src/ui/components/SignIn/SignInFactorOne.tsx Outdated
@jescalanjescalan changed the title fix(clerk-js): backport forgot password from sign-in startfix(clerk-js): Backport forgot password from sign-in startJul 23, 2026
@pkg-pr-new

Copy link
Copy Markdown

Open in StackBlitz

@clerk/agent-toolkit

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

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

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

@clerk/elements

npm i https://pkg.pr.new/@clerk/elements@9224

@clerk/clerk-expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/clerk-react

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

@clerk/react-router

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

@clerk/remix

npm i https://pkg.pr.new/@clerk/remix@9224

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/themes

npm i https://pkg.pr.new/@clerk/themes@9224

@clerk/types

npm i https://pkg.pr.new/@clerk/types@9224

@clerk/upgrade

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

@clerk/vue

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

commit: a032a0a

@wobsoriano
wobsoriano merged commit e0154fe into release/core-2Jul 23, 2026
67 of 80 checks passed
@wobsoriano
wobsoriano deleted the backport/8733-forgot-password-core-2 branch July 23, 2026 18:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jescalan@wobsoriano