import {withAuth} from "next-auth/middleware"; export default withAuth({ callbacks: { authorized: async ({req}) => { const pathname = req.nextUrl.pathname; if (pathname.startsWith('/_next') || pathname === '/favicon.ico' || pathname === '/__ENV.js') { return true } return false }, }, pages: { signIn: '/sign-in' } })