Skip to content

Commit a6bd339

Browse files
upadted the logout-auto-login session 769
1 parent a2eea87 commit a6bd339

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/app/src/app/api/auth/[...nextauth]/route.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ export const nextAuthOptions = {
2525
GithubProvider({
2626
clientId: env.GITHUB_CLIENT_ID,
2727
clientSecret: env.GITHUB_CLIENT_SECRET,
28+
authorization: {
29+
params: {
30+
// Request standard scopes explicitly and attempt to force a fresh login
31+
scope: "read:user user:email",
32+
// Some providers respect prompt=login; GitHub may ignore it, but harmless
33+
prompt: "login",
34+
},
35+
},
2836
}),
2937
],
3038
callbacks: {

packages/app/src/components/ui/buttons.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export const LoginButton = () => {
1313
onClick={() =>
1414
signIn("github", {
1515
callbackUrl: `${location.origin}/race`,
16+
// Attempt to force a fresh login at the provider
17+
prompt: "login",
1618
})
1719
}
1820
>

0 commit comments

Comments
 (0)