mirror of
https://github.com/UiO-Gaming/name-100-uio-gamers.git
synced 2026-11-05 13:56:53 +01:00
Only request the identify scope from Discord
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ecfa50799e
commit
d7e9669382
1 file changed
+2
-1
+2
-1
@@ -17,6 +17,7 @@ export const authOptions: NextAuthOptions = {
|
||||
DiscordProvider({
|
||||
clientId: process.env.DISCORD_CLIENT_ID as string,
|
||||
clientSecret: process.env.DISCORD_CLIENT_SECRET as string,
|
||||
authorization: { params: { scope: "identify" } },
|
||||
profile(profile: DiscordProfile) {
|
||||
if (profile.avatar === null) {
|
||||
const defaultAvatarNumber = parseInt(profile.discriminator) % 5;
|
||||
@@ -28,7 +29,7 @@ export const authOptions: NextAuthOptions = {
|
||||
return {
|
||||
id: profile.id,
|
||||
name: profile.global_name ?? profile.username,
|
||||
email: profile.email,
|
||||
email: null,
|
||||
image: profile.image_url,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user