Posts by Vinicius Fantinatto de Souza • 1 point
1 post
-
-1
votes0
answers5
viewsQ: How to protect routes that already exist in a next.js app without replicating getServerSideProps on all pages
I am mounting an authentication in an existing next.js app and need to protect the routes. The best way I found is by using cookie and the getServerSideProps method so that when a protected route is…