discord-multipurpose-bot/dashboard/app/api/auth/[...nextauth]/route.ts
2024-10-29 13:09:09 +00:00

21 lines
486 B
TypeScript

import NextAuth from "next-auth";
import DiscordProvider from "next-auth/providers/discord";
const options = {
providers: [
DiscordProvider({
clientId: process.env.DISCORD_CLIENT_ID!,
clientSecret: process.env.DISCORD_CLIENT_SECRET!,
authorization: {
params: {
scope: "identify guilds",
},
},
}),
],
secret: process.env.NEXTAUTH_SECRET,
};
const handler = NextAuth(options);
export { handler as GET, handler as POST };