1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import { withAuth } from "next-auth/middleware" export default withAuth({ callbacks: { authorized: ({ token }) => !!token, }, }) export const config = { matcher: [ "/settings/:path*", "/dashboard/:path*", "/api/user/:path*" ] }