Next.js Middleware query
Unanswered
Silver Fox posted this in #help-forum
Silver FoxOP
export default auth((req) => {
...
if (isApiAuthRoute) {
return null as any
}
if (!isLoggedIn && !isPublicRoute) {
return NextResponse.redirect(new URL("auth/login/", nextUrl))
}
return null
})Hi, how do I allow the user to visit?
return null works but doesn't seem appropriate