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