Protect routes in nextjs

How to protect routes in nextjs without withPageAuth? because I'm also using getStaticProps.
Was this page helpful?