Skip to content

feat(ui,shared,localizations): guide users to reset their password when sign-in requires it - #10926

Open
tmilewski wants to merge 9 commits into
mainfrom
tom/reset-password-when-required
Open

tmilewski wants to merge 9 commits into
mainfrom
tom/reset-password-when-required

Conversation

@tmilewski

@tmilewski tmilewski commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Description

When a password attempt returns password_reset_required, <SignIn /> and the reverification modal now take the user to a "Password reset required" screen. Until now, the password card showed the API's English message and left the user to find "Forgot password?" on their own.

  • Password step of sign-in. The screen shows the localized message, leads with "Reset your password", and lists the other sign-in methods under it, as the breached-password screen does. It has no back link, because the same password would be rejected again.
  • First step of sign-in. When the browser autofills the password and the API returns password_reset_required, the sign-in restarts with the identifier only and opens the same screen, with the message, so the user does not enter the password again. The error reaches the password step through window.Clerk, as other errors handed between steps do. Other password errors there still continue on the password step, as before.
  • Reverification. When the session offers a reset-password code, the modal offers the reset and the other methods. When the caller already passed a new password, as UserProfile's change password form does, the subtitle says that confirming saves it. Without a reset code, the localized message shows on the password card.

New localization keys: signIn.passwordResetRequired.title, reverification.passwordResetRequired.title, reverification.passwordResetRequired.subtitle__saveNewPassword and unstable__errors.password_reset_required. Every locale has translations for them.

@clerk/shared/error adds isPasswordResetRequiredError, marked @internal like isPasswordPwnedError and isPasswordCompromisedError.

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:

…en sign-in requires it

The password step of <SignIn /> and of the reverification modal now
recognises password_reset_required. Instead of showing the API message on
the password card, it opens a "Password reset required" screen that leads
with "Reset your password" and lists the other methods. An autofilled
password on the first sign-in step goes to the password step, as
form_password_pwned already does.
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 24, 2026 8:54pm UTC
mosaic-docs Ready Ready Preview Nov 24, 2026 8:54pm UTC
swingset Ready Ready Preview Nov 24, 2026 8:54pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 003b010

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

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

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

CodeRabbit ASCII loading animation

Currently processing new changes in this PR. This may take a few minutes, please wait...

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 978000d and 003b010.

Files selected for processing: 52

  • 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/SignIn/SignInFactorOne.tsx
  • packages/ui/src/components/SignIn/__tests__/SignInFactorOne.test.tsx

No actionable comments were generated in the recent review.

Walkthrough

The change adds password-reset-required handling to sign-in and reverification. Sign-in retries with the identifier after this error and carries the error into the next card, where reset options are shown. Reverification handles the error with reset-specific messaging and methods. Localization resources add the related text across locales. Unit and integration tests cover these flows, including email-code verification and sign-in with a new password.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • clerk/javascript#10396: Adds reset-password factors and password entry to the reverification modal, which overlaps with this PR’s reverification flow and localization changes.

Suggested reviewers: ephem, dmoerner

Merge Risk: Low · previous review 97800

When a security challenge interrupts the sign-in retry after an autofilled password needs a reset, the user may see the normal password screen instead of the reset guidance. They can still use forgot password, so this is a small gap that can be followed up after merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: sign-in and reverification guide users to reset their password when a password attempt returns password_reset_required. It also names the affected packages (ui, shared…
Description check Passed The description states the purpose of the change. It covers the sign-in password step, the autofill-driven first step, and the reverification modal. It also lists the new localization keys and the isP…
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.
Full details: Title check

Explanation

The title names the main change: sign-in and reverification guide users to reset their password when a password attempt returns password_reset_required. It also names the affected packages (ui, shared, localizations). The title is specific and matches the changeset, which adds the reset-required screens, the shared error predicate, and the localization keys.

Full details: Description check

Explanation

The description states the purpose of the change. It covers the sign-in password step, the autofill-driven first step, and the reverification modal. It also lists the new localization keys and the isPasswordResetRequiredError export, all of which match the changeset.

Warning

Linked repositories: This review skipped 6 repositories. Cross-repository analysis may be incomplete. Check linked repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3c12ec3 and 978000d.

Files selected for processing: 2

  • packages/ui/src/components/SignIn/SignInFactorOne.tsx
  • packages/ui/src/components/SignIn/__tests__/SignInFactorOne.test.tsx
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.

@pkg-pr-new

pkg-pr-new Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10926

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10926

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10926

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 003b010

The card that a navigation leads to read its error from window.Clerk, so an
error handed over between steps was lost when Clerk came from the npm
package and window.Clerk was not set. This included the reset-required
screen after an autofilled password on the first sign-in step.

Cards now read the error from the Clerk instance they render with, which is
where __internal_navigateWithError already stores it. The first sign-in step
and the SSO callback hand errors over the same way.
@blacksmith-sh

blacksmith-sh Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Matches Password step opens 'Password reset required' screen

Head shows 'Password reset required' with the localized message, 'Reset your password' first, email code and social methods under it, no back link; base 9136505 kept the password card with the API's English text.

Merge-base

Password card with API text

This PR 003b0108

Password reset required screen

Merge-base

FAPI calls and card text

This PR 003b0108

FAPI calls and card text

Also checked · 7 match

Matches Autofilled password on first step goes straight to reset screen
Matches Other autofilled-password errors still land on password step
Matches Reverification offers reset; change-password subtitle says confirming saves it
Matches Reverification without reset code shows localized message on card
Matches New strings are translated in other locales
Matches OTP-preferred instance: reset screen offers email code, not password
Matches 'Reset your password' sends the reset code

Proof on 003b0108 (from 978000d3) · mocked: Clerk Frontend API (Playwright routes return password_reset_required; for c7 the environment's prefe...) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-24T20:52:44.137Z

Summary

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

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


@clerk/shared

Current version: 4.48.3
Recommended bump: MINOR → 4.49.0

Subpath ./internal/clerk-js/constants

🟡 Non-breaking Changes (1)

Modified: ERROR_CODES
// ... 1 unchanged line elided ...
    readonly FORM_IDENTIFIER_NOT_FOUND: "form_identifier_not_found";
    readonly FORM_PASSWORD_INCORRECT: "form_password_incorrect";
    readonly FORM_PASSWORD_PWNED: "form_password_pwned";
+   readonly PASSWORD_RESET_REQUIRED: "password_reset_required";
    readonly INVALID_STRATEGY_FOR_USER: "strategy_for_user_invalid";
    readonly NOT_ALLOWED_TO_SIGN_UP: "not_allowed_to_sign_up";
    readonly OAUTH_ACCESS_DENIED: "oauth_access_denied";
// ... 26 unchanged lines elided ...

Static analyzer: Breaking change in variable ERROR_CODES: Type changed: {readonly FORM_IDENTIFIER_NOT_FOUND:"form_identifier_not_found";readonly FORM_PASSWORD_INCORRECT:"form_password_incorre… → {readonly FORM_IDENTIFIER_NOT_FOUND:"form_identifier_not_found";readonly FORM_PASSWORD_INCORRECT:"form_password_incorre…

🤖 AI review (reclassified as non-breaking) (95%): The only difference is a new PASSWORD_RESET_REQUIRED key added to ERROR_CODES; all previously existing keys and their literal values are unchanged, so no existing consumer code reading those keys is broken.

Subpath ./types

🟡 Non-breaking Changes (1)

Modified: __internal_LocalizationResource
Diff (before: 2467 lines, after: 2474 lines). Click to expand.
// ... 391 unchanged lines elided ...
      passwordCompromised: {
        title: LocalizationValue;
      };
+     passwordResetRequired: {
+       title: LocalizationValue;
+     };
      passkey: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
      };
      forgotPasswordAlternativeMethods: {
        title: LocalizationValue;
        label__alternativeMethods: LocalizationValue;
        blockButton__resetPassword: LocalizationValue;
      };
      forgotPassword: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        subtitle_email: LocalizationValue;
        subtitle_phone: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      resetPassword: {
        title: LocalizationValue;
        formButtonPrimary: LocalizationValue;
        successMessage: LocalizationValue;
        requiredMessage: LocalizationValue;
      };
      resetPasswordMfa: {
        detailsLabel: LocalizationValue;
      };
      emailCode: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      emailLink: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        formSubtitle: LocalizationValue;
        resendButton: LocalizationValue;
        unusedTab: {
          title: LocalizationValue;
        };
        verified: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
        };
        verifiedSwitchTab: {
          subtitle: LocalizationValue;
          titleNewTab: LocalizationValue;
          subtitleNewTab: LocalizationValue;
        };
        verifiedTransferable: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
        };
        loading: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
        };
        failed: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
        };
        expired: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
        };
        clientMismatch: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
        };
      };
      phoneCode: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      alternativePhoneCodeProvider: {
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
        subtitle: LocalizationValue;
        title: LocalizationValue<'provider'>;
      };
      emailCodeMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      emailLinkMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formSubtitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      newDeviceVerificationNotice: LocalizationValue;
      phoneCodeMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      totpMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
      };
      backupCodeMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
      };
      passkeyMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
      };
      alternativeMethods: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        actionLink: LocalizationValue;
        actionText: LocalizationValue;
        blockButton__emailLink: LocalizationValue<'identifier'>;
        blockButton__emailCode: LocalizationValue<'identifier'>;
        blockButton__phoneCode: LocalizationValue<'identifier'>;
        blockButton__password: LocalizationValue;
        blockButton__passkey: LocalizationValue;
        blockButton__totp: LocalizationValue;
        blockButton__backupCode: LocalizationValue;
        getHelp: {
          title: LocalizationValue;
          content: LocalizationValue;
          blockButton__emailSupport: LocalizationValue;
        };
      };
      noAvailableMethods: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        message: LocalizationValue;
      };
      accountSwitcher: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        action__addAccount: LocalizationValue;
        action__signOutAll: LocalizationValue;
      };
      enterpriseConnections: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
      };
      enterpriseSSO: {
        formButtonPrimary: LocalizationValue;
      };
      ssoBypass: {
        actionLink: LocalizationValue;
        notice: LocalizationValue;
        code: {
          title: LocalizationValue;
          subtitle: LocalizationValue;
          resendButton: LocalizationValue;
        };
      };
      web3Solana: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
      };
      protectCheck: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        loading: LocalizationValue;
        retryButton: LocalizationValue;
      };
    };
    reverification: {
      password: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        actionLink: LocalizationValue;
      };
      emailCode: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      phoneCode: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      phoneCodeMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
        resendButton: LocalizationValue;
      };
      totpMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        formTitle: LocalizationValue;
      };
      backupCodeMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
      };
      passkey: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        blockButton__passkey: LocalizationValue;
      };
      passkeyMfa: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        blockButton__passkey: LocalizationValue;
      };
      alternativeMethods: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        actionLink: LocalizationValue;
        actionText: LocalizationValue;
        blockButton__emailCode: LocalizationValue<'identifier'>;
        blockButton__phoneCode: LocalizationValue<'identifier'>;
        blockButton__password: LocalizationValue;
        blockButton__totp: LocalizationValue;
        blockButton__passkey: LocalizationValue;
        blockButton__backupCode: LocalizationValue;
        getHelp: {
          title: LocalizationValue;
          content: LocalizationValue;
          blockButton__emailSupport: LocalizationValue;
        };
      };
      noAvailableMethods: {
        title: LocalizationValue;
        subtitle: LocalizationValue;
        message: LocalizationValue;
      };
      passwordPwned: {
        title: LocalizationValue;
        subtitle__saveNewPassword: LocalizationValue;
      };
      passwordCompromised: {
+       title: LocalizationValue;
+       subtitle__saveNewPassword: LocalizationValue;
+     };
+     passwordResetRequired: {
        title: LocalizationValue;
        subtitle__saveNewPassword: LocalizationValue;
      };
// ... 1829 unchanged lines elided ...

Static analyzer: Breaking change in type alias __internal_LocalizationResource: Type changed: {locale:string;maintenanceMode:import("@clerk/shared").LocalizationValue;roles:{[r:string]:import("@clerk/shared").Loca… → {locale:string;maintenanceMode:import("@clerk/shared").LocalizationValue;roles:{[r:string]:import("@clerk/shared").Loca…

🤖 AI review (reclassified as non-breaking) (75%): The only visible difference is 7 additional elided lines (2394 vs 2387), indicating new optional localization key additions to the deeply-partial LocalizationResource interface; __internal_LocalizationResource is consumed via DeepPartial<DeepLocalizationWithoutObjects<...>> making all fields optional for consumers, so added keys are non-breaking additions.


Report generated by Break Check

Last ran on 003b010.

coderabbitai[bot]

This comment was marked as resolved.

# Conflicts:
#	packages/ui/src/components/SignIn/SignInFactorOne.tsx

This branch was successfully deployed

2 active deployments
Preview – swingset — 003b0108 Deployed Nov 24, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 003b0108 Deployed Nov 24, 2026 by vercel[bot]
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.

1 participant