Lot of resources (even vercel team members have videos on this) recommend middleware for authentication.
But recently I encountered problem when server functions are not properly redirected in middleware.
I describe it here
https://github.com/vercel/next.js/discussions/81608
Can someone have a look/help?