From ade7ad19d6000447dc4f5d92d8e1f940a15509b9 Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Tue, 2 Dec 2025 14:12:22 +0000 Subject: [PATCH] Fix getCurrentSession for NextAuth v4 compatibility --- lib/auth-actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/auth-actions.ts b/lib/auth-actions.ts index eab16f0..e34bbc1 100644 --- a/lib/auth-actions.ts +++ b/lib/auth-actions.ts @@ -195,7 +195,8 @@ export async function logoutUser(): Promise { */ export async function getCurrentSession() { try { - const { auth } = await import('@/auth') + const { getServerSession } = await import('next-auth/next') + const { authOptions } = await import('@/pages/api/auth/[...nextauth]') const session = await getServerSession(authOptions) return session } catch (error) {