| 1 | import NextAuth from "next-auth"; |
| 2 | import { DrizzleAdapter } from "@auth/drizzle-adapter"; |
| 3 | import { db } from "./db"; |
| 4 | import { authConfig } from "./auth.config"; |
| 5 | |
| 6 | export const { |
| 7 | handlers: { GET, POST }, |
| 8 | auth, |
| 9 | signIn, |
| 10 | signOut, |
| 11 | } = NextAuth({ |
| 12 | adapter: DrizzleAdapter(db), |
| 13 | session: { strategy: "jwt" }, |
| 14 | ...authConfig, |
| 15 | }); |