Protect Pages/API
Unanswered
alfie posted this in #help-forum
alfieOP
using nextjs how can i make it so all pages & api endpoints cant be accessed without auth (excluding /, /login, /register)
have sessions and jwts
have sessions and jwts
2 Replies
@alfie using nextjs how can i make it so all pages & api endpoints cant be accessed without auth (excluding /, /login, /register)
have sessions and jwts
I would use middleware.
clerk provides a nice sdk for nextjs https://clerk.com/docs/references/nextjs/auth-middleware
clerk provides a nice sdk for nextjs https://clerk.com/docs/references/nextjs/auth-middleware
German Roughhaired Pointer