Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/app/src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ export const nextAuthOptions = {
GithubProvider({
clientId: env.GITHUB_CLIENT_ID,
clientSecret: env.GITHUB_CLIENT_SECRET,
authorization: {
params: {
// Request standard scopes explicitly and attempt to force a fresh login
scope: "read:user user:email",
// Some providers respect prompt=login; GitHub may ignore it, but harmless
prompt: "login",
},
},
}),
],
callbacks: {
Expand Down
2 changes: 2 additions & 0 deletions packages/app/src/components/ui/buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const LoginButton = () => {
onClick={() =>
signIn("github", {
callbackUrl: `${location.origin}/race`,
// Attempt to force a fresh login at the provider
prompt: "login",
})
}
>
Expand Down