From df5f5b75163a142c8ee276063d1666ecb0221411 Mon Sep 17 00:00:00 2001 From: Leon Serfaty G Date: Mon, 1 Sep 2025 06:50:32 +0000 Subject: [PATCH] I see this error with the app, reported by NextJS, please fix it. The er --- src/auth.ts | 6 +++++- src/middleware.ts | 5 ++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/auth.ts b/src/auth.ts index 429e399..a502026 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -2,4 +2,8 @@ import NextAuth from 'next-auth'; import { authConfig } from './auth.config'; -export const { handlers, auth, signIn, signOut } = NextAuth(authConfig); +export const runtime = "nodejs"; + +const { handlers, auth, signIn, signOut } = NextAuth(authConfig); + +export { handlers, auth, signIn, signOut }; diff --git a/src/middleware.ts b/src/middleware.ts index 6424f95..72609e0 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,8 +1,7 @@ -import NextAuth from 'next-auth'; -import { authConfig } from './auth.config'; +import { auth } from '@/auth'; -export default NextAuth(authConfig).auth; +export default auth; export const config = { // https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher