link-stack/apps/link/app/(main)/api/auth/[...nextauth]/route.ts

23 lines
522 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";
2023-02-22 13:05:52 +00:00
// import Apple from "next-auth/providers/apple";
2022-12-02 10:55:56 +00:00
2023-07-18 12:26:57 +00:00
const handler = NextAuth({
2022-12-02 10:55:56 +00:00
providers: [
Google({
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
}),
2023-02-22 13:05:52 +00:00
/*
2022-12-02 10:55:56 +00:00
Apple({
clientId: process.env.APPLE_CLIENT_ID,
clientSecret: process.env.APPLE_CLIENT_SECRET
}),
2023-02-22 13:05:52 +00:00
*/
2022-12-02 10:55:56 +00:00
],
secret: process.env.NEXTAUTH_SECRET,
});
2023-07-18 12:26:57 +00:00
export { handler as GET, handler as POST };