image description placeholder I'm trying to modify the scope, remove the email and include guilds in my project. I searched for a solution but couldn't find one that worked. Can anyone help me figure out how to change the scopes?
I attempted to make changes using the following code.
import NextAuth from "next-auth"
import Discord from "next-auth/providers/discord"
import type { NextAuthConfig } from "next-auth"
export const config = {
theme: {
logo: "https://next-auth.js.org/img/logo/logo-sm.png",
},
providers: [
Discord({ clientId: "1183095707033403462", clientSecret: "HQAtuIRXhgl3sH3oW9cNYXgX8VmOO82N", authorization: { params: { scope: 'identify guilds' } }
})
],
callbacks: {
authorized({ request, auth }) {
const { pathname } = request.nextUrl
if (pathname === "/middleware-example") return !!auth
return true
},
},
} satisfies NextAuthConfig
export const { handlers, auth, signIn, signOut } = NextAuth(config)
This approach doesn't seem to be effective :(