In my project, I have the following pages: /about, /user, and /user/[id]. Unfortunately, I am unable to access req.page, which provides the slug (i.e. /user/[id]), making it difficult for me to implement logic to redirect requests from unauthenticated users. My question is whether there is a specific method provided by nextjs 13 to secure routes.
I experimented with using the next-shield
package to address this issue, but it ended up producing flashy content.