Example repo, NextAuth with App Router
Is there any example repo for NextAuth with App Router? For protecting pages, not /api
2 Replies
Securing pages and API routes | NextAuth.js
You can easily protect client and server side rendered pages and API routes with NextAuth.js.
Oh thanks I was looking for that middleware part
I was now using some sort of Provider, using the useSession hook and pushing to login with useRouter 🥲