2021-11-16 22:52:23 +01:00
|
|
|
import NextAuth from "next-auth";
|
|
|
|
import Providers from "next-auth/providers";
|
2021-06-21 12:23:41 +02:00
|
|
|
|
|
|
|
export default NextAuth({
|
2021-11-16 22:52:23 +01:00
|
|
|
// Configure one or more authentication providers
|
|
|
|
providers: [
|
|
|
|
Providers.Discord({
|
|
|
|
clientId: process.env.DISCORD_ID,
|
|
|
|
clientSecret: process.env.DISCORD_SECRET,
|
|
|
|
}),
|
|
|
|
// ...add more providers here
|
|
|
|
],
|
2021-06-21 12:23:41 +02:00
|
|
|
|
2021-11-16 22:52:23 +01:00
|
|
|
// A database is optional, but required to persist accounts in a database
|
|
|
|
database: process.env.DATABASE_URL,
|
|
|
|
});
|