Skip to content

fix(auth): header Sign In 跳登录选择页,让用户能选 GitHub / Discord#383

Merged
longsizhuo merged 1 commit into
mainfrom
fix/signin-provider-choice
Jul 19, 2026
Merged

fix(auth): header Sign In 跳登录选择页,让用户能选 GitHub / Discord#383
longsizhuo merged 1 commit into
mainfrom
fix/signin-provider-choice

Conversation

@longsizhuo

Copy link
Copy Markdown
Member

问题

#382 把 GitHub / Discord 两个登录按钮放在 /login 页,但 header 上的 "Sign In"(AuthNav 里的 <SignInButton />,无 provider)还是直跳 /oauth/render/github——用户点 header 的 Sign In 就直奔 GitHub 授权,根本看不到 Discord 选项。(登录本身没坏,state cookie 往返实测通过;纯 UX。)

改动

SignInButton

  • provider(登录页两个按钮)→ 直跳 /oauth/render/{provider}(不变)
  • 不传 provider(header 的 Sign In)→ 跳 /login 选择页,让用户在 GitHub / Discord 间选

header 的 <SignInButton /> 无 props 调用自动获得"先选后登",无需改 AuthNav。

typecheck / lint(0 error)通过。

#382 把 GitHub/Discord 两个按钮放在了 /login 页,但 header 的 "Sign In"
(AuthNav 里 <SignInButton /> 无 provider)仍直跳 /oauth/render/github,
用户点了就直奔 GitHub、根本看不到 Discord 选项。

改:SignInButton 不传 provider 时跳 /login 选择页;登录页两个按钮传了
provider 仍直跳对应授权。header 无 props 调用自动获得"先选后登"。
Copilot AI review requested due to automatic review settings July 19, 2026 16:59
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
involutionhell-github-io Ready Ready Preview, Comment Jul 19, 2026 5:08pm
website-preview Ready Ready Preview, Comment Jul 19, 2026 5:08pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@longsizhuo
longsizhuo merged commit 469132e into main Jul 19, 2026
8 checks passed
@longsizhuo
longsizhuo deleted the fix/signin-provider-choice branch July 19, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants