Skip to main content

Showing tag results for Protected Routes

Posts

0 comments 0 reactions

How to Protect a Next.js Route Handler with Better Auth

Jagdish Kumawat

Protect a Next.js API route with Better Auth: read the session from the request and answer with a 401 error when nobody is signed in.

  • Web Application
  • Better Auth
0 comments 0 reactions

Fixed: Next.js encountered uncached or runtime data during prerendering

Jagdish Kumawat

npm run build stopped with “Next.js encountered uncached or runtime data during prerendering” after a Next.js 16 page read the Better Auth session at its top. The fix: move that read into a component inside Suspense.

  • Issues
  • Web Application
  • React.js