import NextAuth from "next-auth"; import { authConfig } from "@/auth.config"; // Edge-runtime gate for the whole app. Uses the edge-safe config only — // src/auth.ts pulls in the Node-only Credentials provider and must never be // imported here. export const { auth: middleware } = NextAuth(authConfig); export const config = { matcher: ["/((?!api/auth|_next/static|_next/image|favicon.ico|.*\\.).*)"], };