Bug: <SignUp/> incorrectly formats form_password_matches_identifier as a complexity error.
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- nextjs, react, typescript
调研方向
从标准 Next.js 设置中核心 组件的默认错误处理路径开始,重点关注 meta.param_name 为 password 时对 form_password_matches_identifier 的映射。重现报告中的提交并跟踪 passwordComplexity 的本地化路径;完成标准是表单直接渲染 unstable__errors.form_password_matches_identifier,而不是格式错误的复杂度消息。
由索引模型根据 Issue 内容生成。
描述
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
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:
- Mount a standard component on a fresh Next.js install.
- Enter an email address (e.g., [email protected]).
- Enter a password that exactly matches the email address ([email protected]).
- Complete any remaining required fields (e.g., username, legal consent).
- Submit the form.
- 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.
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
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clerk/javascript 的其他 Issue
-
[expo] useLocalCredentials throws "Invalid key provided to SecureStore" during render when the publishable key has base64 padding (=)可能已有人在做 @RaphaelFakhri 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
clerk/javascript#10033 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
clerk/javascript#10026 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
clerk/javascript#9987 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
clerk/javascript#10011 ·
维护者通常 1 天内回复
-
<UserProfile />: SMS "Set as default" shows the raw reverification error instead of launching reverification, and has no effect while an authenticator app is enrolled可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 50/100
clerk/javascript#9984 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:session-state issue-rating: 🌊 off-meta tidepool P2
难度 2/5 1-3 小时 新手友好度 74/100
openclaw/openclaw#165245 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
agent-canvas bug priority:low ready-for-dev
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
🐛 bug
难度 2/5 1-3 小时 新手友好度 61/100
spicetify/marketplace#1262 ·
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 68/100
维护者通常 1 天内回复