File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
app/api/auth/[...nextauth] Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ export const nextAuthOptions = {
25
25
GithubProvider ( {
26
26
clientId : env . GITHUB_CLIENT_ID ,
27
27
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
+ } ,
28
36
} ) ,
29
37
] ,
30
38
callbacks : {
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ export const LoginButton = () => {
13
13
onClick = { ( ) =>
14
14
signIn ( "github" , {
15
15
callbackUrl : `${ location . origin } /race` ,
16
+ // Attempt to force a fresh login at the provider
17
+ prompt : "login" ,
16
18
} )
17
19
}
18
20
>
You can’t perform that action at this time.
0 commit comments