diff --git a/src/auth.ts b/src/auth.ts index a502026..563393a 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -2,8 +2,6 @@ import NextAuth from 'next-auth'; import { authConfig } from './auth.config'; -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 72609e0..febbf80 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,9 +1,11 @@ import { auth } from '@/auth'; - + export default auth; export const config = { // https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)'], }; + +export const runtime = "nodejs";