Protect certain route after auth ? NextAuth middleware
Hi is there any possible way to protect my pages after auth in middleware ? i dont want to do it in client side since it will
flash
the content for a second , and if i do it with unstable_getServerSession it feels kinda toomuch code duplication ?
if i have auth i want to protect page A,B,C,D
but if i dont have auth i want to protect page E,F,G,H
this is currently how my code look like but is there any other way to do it way more cleverly ? Thanks
1 Reply
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View