Samyam
Samyam
Explore posts from servers
KKinde
Created by Samyam on 8/22/2024 in #💻┃support
Protect all routes except some public ones
No description
5 replies
KKinde
Created by Samyam on 8/22/2024 in #💻┃support
Protect all routes except some public ones
My apologies, I am aware of the middleware but the middleware only protects certain routes, what i wanted to do is to create a middleware what protects all routes by default and if the user is not logged in , it redirects to the login page. But due to next.js caching, it causes issues during authentication as the image states. I wanted to know if there is a workaround for the problem
5 replies