From 256a8614e39e79a80b88425171f3e5ef75ab5d05 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Wed, 12 Mar 2025 15:07:20 +0800 Subject: [PATCH] feat(auth): integrate PrismaAdapter with NextAuth for database integration --- src/auth.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/auth.ts b/src/auth.ts index 52a5bb1..ac4684b 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,5 +1,8 @@ -import NextAuth from "next-auth" - -export const { handlers, signIn, signOut, auth } = NextAuth({ +import NextAuth from "next-auth"; +import { prisma } from "@/lib/prisma"; +import { PrismaAdapter } from "@auth/prisma-adapter"; + +export const { handlers, auth, signIn, signOut } = NextAuth({ + adapter: PrismaAdapter(prisma), providers: [], });