signIn.sso() ignores oidcPrompt for OAuth strategies
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, typescript
调研方向
从链接的 SignIn.ts 第 1353–1360 行开始,比较 sso() 构建创建参数的方式与已经转发 oidc_prompt 的注册路径;同时检查第 443–448 行的 authenticateWithRedirect。运行相关的登录测试,并验证两个受影响的路径发出的请求都包含 oidc_prompt=select_account。
由索引模型根据 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
Publishable key
pk_test_bWFpbi1xdWV0emFsLTcyLmNsZXJrLmFjY291bnRzLmRldiQ
Description
Steps to reproduce:
await signIn.sso({
strategy: 'oauth_google',
oidcPrompt: 'select_account',
redirectUrl: '/dashboard',
redirectCallbackUrl: '/sso-callback',
});
Check the POST /v1/client/sign_ins request in the network tab.
Expected behavior:
Body includes oidc_prompt=select_account and Google shows the account picker.
Actual behavior:
oidc_prompt isn't sent, so Google goes straight to the last used account. sso() doesn't pass it to create:
https://github.com/clerk/javascript/blob/568c6689ab25972f66c44e0fb72f025c2d56a7c0/packages/clerk-js/src/core/resources/SignIn.ts#L1353-L1360
authenticateWithRedirect has the same problem (L443-448).
Passing oidc_prompt to the API directly works and sign-up already forwards it, so I think it's just missing from the params here. Similar to #9354.
Happy to open a PR for this.
Environment
System:
OS: macOS 27.2
Binaries:
Node: 24.21.0
bun: 1.4.2
Browsers:
Chrome: 155.0.8059.40
Safari: 27.2
npmPackages:
@clerk/tanstack-react-start: 1.6.5
@clerk/ui: 1.39.0
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 479
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 313
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clerk/javascript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
clerk/javascript#10026 · 1 条评论 ·
维护者通常 1 天内回复
-
@clerk/nextjs: onBeforeSetActive never settles when invalidateCacheAction rejects (e.g. after a redeploy), so setActive and signOut hang forever可能已有人在做 @RaphaelFakhri 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
clerk/javascript#9987 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
clerk/javascript#10185 ·
维护者通常 1 天内回复
-
难度 4/5 1-2 天 新手友好度 45/100
clerk/javascript#10118 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
clerk/javascript#10117 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
NousResearch/hermes-agent#136483 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
[Bug]: Web chat input doesn't regain focus after a reply finishes可能已有人在做 @GaijinSystems 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
zeroclaw-labs/zeroclaw#11658 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
babylonlabs-io/babylon-toolkit#2711 ·
维护者通常 1 天内回复