Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Bug: <SignUp/> incorrectly formats form_password_matches_identifier as a complexity error.

已关闭
#9,478 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃

调研方向

从标准 Next.js 设置中核心 组件的默认错误处理路径开始,重点关注 meta.param_name 为 password 时对 form_password_matches_identifier 的映射。重现报告中的提交并跟踪 passwordComplexity 的本地化路径;完成标准是表单直接渲染 unstable__errors.form_password_matches_identifier,而不是格式错误的复杂度消息。

由索引模型根据 Issue 内容生成。

描述

needs-triage
Preliminary Checks
Reproduction

This issue occurs out-of-the-box on any standard Next.js setup using the core component, no special reproduction repository is needed as it relies on the core component's default error handling logic.

Publishable key

pk_test_Z3JhdGVmdWwtaGFyZS04Mi5jbGVyay5hY2NvdW50cy5kZXYk

Description

Description:
When a user attempts to sign up with a password that is identical to their username or email, the backend correctly rejects it with a 422 containing the form_password_matches_identifier code.
However, the component appears to intercept this as a password complexity (zxcvbn) error because meta.param_name === "password". Because this specific API error does not return a meta.requirement field, the component seems to pass undefined to the passwordComplexity localizer.
(If this is intended behavior or a misconfiguration on my end, please let me know!)

Steps to reproduce:

  1. Mount a standard component on a fresh Next.js install.
  2. Enter an email address (e.g., [email protected]).
  3. Enter a password that exactly matches the email address ([email protected]).
  4. Complete any remaining required fields (e.g., username, legal consent).
  5. Submit the form.
  6. Observe the UI error under the password field.

Expected behavior:
I would expect the component to recognize form_password_matches_identifier as a standard form error rather than grouping it under passwordComplexity, and render the unstable__errors.form_password_matches_identifier localization string directly (e.g., "Password cannot be the same as your email.").

Actual behavior:
The component appears to fail to format a complexity requirement, resulting in a glitched UI string built from passwordComplexity.sentencePrefix + "" + ".". The UI renders the error: "Your password must contain ."

Additional context:
While the attached screenshot shows a customized screen using Clerk's appearance props and localization, I have done my best to verify that this glitch is not caused by any of my custom overrides. It seems to be a bug in the core SDK's error mapping for form_password_matches_identifier that occurs even on a completely vanilla component.
Image

Environment
System:
    OS: Windows 11 10.0.26200
    CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor            
    Memory: 3.00 GB / 15.94 GB
  Binaries:
    Node: 24.15.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.12.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 151.0.7922.138
    Edge: Chromium (151.0.4129.86)
  npmPackages:
    @clerk/nextjs: ^7.5.20 => 7.5.20 
    @clerk/themes: ^2.4.57 => 2.4.57 
    @clerk/ui: ^1.25.7 => 1.27.1 
    next: ^16.2.10 => 16.2.12 
    react: ^19.2.7 => 19.2.7 
    react-dom: ^19.2.7 => 19.2.7
主要语言
TypeScript
星标
1.8k
派生
477
平均合并
2 天 3 小时
30 天内合并 PR
269

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

clerk/javascript 的其他 Issue

查看 clerk/javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。