NextAuth DiscordProviders scopes not working.
Answered
Kryp Arnold posted this in #help-forum
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?
3 Replies
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
i just downgraded next-auth and it works
Answer