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

signIn.sso() ignores oidcPrompt for OAuth strategies

未关闭 适合新手
#10,119 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@wobsoriano 已经在做这个了。

开始于 2026年10月7日。

  • #10125 来自 @wobsoriano —— 未关闭

评估

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

调研方向

从链接的 SignIn.ts 第 1353–1360 行开始,比较 sso() 构建创建参数的方式与已经转发 oidc_prompt 的注册路径;同时检查第 443–448 行的 authenticateWithRedirect。运行相关的登录测试,并验证两个受影响的路径发出的请求都包含 oidc_prompt=select_account。

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

描述

Preliminary Checks
Reproduction

https://github.com/clerk/javascript/blob/568c6689ab25972f66c44e0fb72f025c2d56a7c0/packages/clerk-js/src/core/resources/SignIn.ts#L1353-L1360

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

环境准备

从这里开始

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

clerk/javascript 的其他 Issue

查看 clerk/javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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