link-stack/apps/leafcutter/app/api/auth/[...nextauth]/route.ts

20 lines
529 B
TypeScript
Raw Normal View History

2023-02-13 13:46:56 +00:00
import NextAuth from "next-auth";
import Google from "next-auth/providers/google";
import Apple from "next-auth/providers/apple";
2023-06-26 10:07:12 +00:00
const handler = NextAuth({
2023-02-13 13:46:56 +00:00
providers: [
Google({
2023-05-24 20:27:57 +00:00
clientId: process.env.GOOGLE_CLIENT_ID ?? "",
clientSecret: process.env.GOOGLE_CLIENT_SECRET ?? "",
2023-02-13 13:46:56 +00:00
}),
Apple({
2023-05-24 20:27:57 +00:00
clientId: process.env.APPLE_CLIENT_ID ?? "",
clientSecret: process.env.APPLE_CLIENT_SECRET ?? "",
2023-02-13 13:46:56 +00:00
}),
],
secret: process.env.NEXTAUTH_SECRET,
});
2023-06-26 10:07:12 +00:00
export { handler as GET, handler as POST };