Next.js Discord

Discord Forum

NextAuth DiscordProviders scopes not working.

Answered
Kryp Arnold posted this in #help-forum
Open in Discord
Avatar
Hello guys, i have a discord provider in my next-auth app, it is working but there is an issue, i want to ask user for guilds and the identify scopes but it always asks for identify and email how can i fix it?
Answered by Kryp Arnold
i just downgraded next-auth and it works
View full answer

3 Replies

Avatar
import NextAuth from "next-auth";
import Discord from "next-auth/providers/discord";

const scopes = ["identify", "guilds"].join(" ");

export const {
    handlers: { GET, POST },
    auth,
} = NextAuth({
    providers: [
        Discord({
            authorization: { params: scopes },
            clientId: process.env.AUTH_DISCORD_ID,
            clientSecret: process.env.AUTH_DISCORD_SECRET,
        }),
    ],
});
here is my
app/api/auth/[...nextauth]/route.ts
Avatar
i just downgraded next-auth and it works
Answer