Can anyone help me apply middleware to my next web application so that it follows correct usage?
Unanswered
Polar bear posted this in #help-forum
Original message was deleted.
1 Reply
Toyger
you can go either with couple middlewares, and redirect based on your role-based logic
or you can use getServerSideProps, nextjs have even example in docs for that https://nextjs.org/docs/pages/building-your-application/routing/authenticating#authenticating-server-rendered-pages
or you can use getServerSideProps, nextjs have even example in docs for that https://nextjs.org/docs/pages/building-your-application/routing/authenticating#authenticating-server-rendered-pages