move to next-auth

This commit is contained in:
Thomas Ruoff
2021-10-02 00:35:28 +02:00
committed by Thomas Ruoff
parent 9f4180388b
commit b257bc8258
12 changed files with 536 additions and 1418 deletions

View File

@@ -0,0 +1,23 @@
import NextAuth from "next-auth"
import GithubProvider from "next-auth/providers/github"
import EmailProvider from "next-auth/providers/email"
export default NextAuth({
providers: [
EmailProvider({
server: {
host: "smtp.sendgrid.net",
port: 587,
auth: {
user: "apikey",
pass: process.env.SENDGRID_API_KEY,
},
},
from: process.env.FROM_EMAIL
}),
GithubProvider({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
],
})