I see this error with the app, reported by NextJS, please fix it. The er
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
import NextAuth from 'next-auth';
|
import { handlers, auth, signIn, signOut } from '@/auth';
|
||||||
import { authConfig } from '@/auth.config';
|
|
||||||
|
|
||||||
export const { handlers, auth, signIn, signOut } = NextAuth(authConfig);
|
export const { GET, POST } = handlers;
|
||||||
|
|
||||||
export const GET = handlers.GET;
|
export { auth, signIn, signOut };
|
||||||
export const POST = handlers.POST;
|
|
||||||
|
export const runtime = "nodejs";
|
||||||
|
|||||||
+2
-2
@@ -2,6 +2,6 @@
|
|||||||
import NextAuth from 'next-auth';
|
import NextAuth from 'next-auth';
|
||||||
import { authConfig } from './auth.config';
|
import { authConfig } from './auth.config';
|
||||||
|
|
||||||
const { handlers, auth, signIn, signOut } = NextAuth(authConfig);
|
export const { handlers, auth, signIn, signOut } = NextAuth(authConfig);
|
||||||
|
|
||||||
export { handlers, auth, signIn, signOut };
|
export const runtime = "nodejs";
|
||||||
|
|||||||
+4
-5
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
import { auth } from '@/auth';
|
import NextAuth from 'next-auth';
|
||||||
|
import { authConfig } from '@/auth.config';
|
||||||
export default auth;
|
|
||||||
|
export default NextAuth(authConfig).auth;
|
||||||
|
|
||||||
export const runtime = 'nodejs';
|
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
// https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
|
// https://nextjs.org/docs/app/building-your-application/routing/middleware#matcher
|
||||||
matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
|
matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
|
||||||
|
|||||||
Reference in New Issue
Block a user