fix(auth): header Sign In 跳登录选择页,让用户能选 GitHub / Discord#383
Merged
Conversation
#382 把 GitHub/Discord 两个按钮放在了 /login 页,但 header 的 "Sign In" (AuthNav 里 <SignInButton /> 无 provider)仍直跳 /oauth/render/github, 用户点了就直奔 GitHub、根本看不到 Discord 选项。 改:SignInButton 不传 provider 时跳 /login 选择页;登录页两个按钮传了 provider 仍直跳对应授权。header 无 props 调用自动获得"先选后登"。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
#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}(不变)/login选择页,让用户在 GitHub / Discord 间选header 的
<SignInButton />无 props 调用自动获得"先选后登",无需改 AuthNav。typecheck / lint(0 error)通过。