2023-03-03 17:48:43 +01:00
|
|
|
import NextAuth from "next-auth";
|
|
|
|
import Providers from "next-auth/providers";
|
|
|
|
|
|
|
|
export default NextAuth({
|
|
|
|
// Configure one or more authentication providers
|
|
|
|
providers: [
|
|
|
|
Providers.Discord({
|
|
|
|
clientId: process.env.DISCORD_ID,
|
|
|
|
clientSecret: process.env.DISCORD_SECRET,
|
2023-04-04 18:14:34 +02:00
|
|
|
scope: "identify guilds guilds.join bot email",
|
2023-03-03 17:48:43 +01:00
|
|
|
}),
|
|
|
|
// ...add more providers here
|
|
|
|
],
|
|
|
|
|
|
|
|
// A database is optional, but required to persist accounts in a database
|
|
|
|
database: process.env.DATABASE_URL,
|
|
|
|
});
|