mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 06:57:12 +01:00
move to next-auth
This commit is contained in:
committed by
Thomas Ruoff
parent
9f4180388b
commit
b257bc8258
23
pages/api/auth/[...nextauth].ts
Normal file
23
pages/api/auth/[...nextauth].ts
Normal 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,
|
||||
}),
|
||||
],
|
||||
})
|
||||
Reference in New Issue
Block a user