link-stack/pages/api/auth/[...nextauth].ts

18 lines
458 B
TypeScript
Raw Normal View History

2022-12-02 10:55:56 +00:00
import NextAuth from "next-auth";
import Google from "next-auth/providers/google";
import Apple from "next-auth/providers/apple";
export default NextAuth({
providers: [
Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
Apple({
clientId: process.env.APPLE_CLIENT_ID,
clientSecret: process.env.APPLE_CLIENT_SECRET
}),
],
secret: process.env.NEXTAUTH_SECRET,
});