Skip to main content

Showing tag results for Session Management

Posts

0 comments 0 reactions

How to Use the Better Auth nextCookies Plugin in Next.js

Jagdish Kumawat

Without the nextCookies plugin, a sign-in that runs in a Next.js server action never reaches the browser. Add the plugin, and the cookie arrives.

  • Web Application
  • Better Auth
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
0 comments 0 reactions

How to Show the Signed-In User with Better Auth useSession

Jagdish Kumawat

Show the signed-in user with Better Auth useSession: read data and isPending in a client component, and the Next.js header updates by itself on sign-in and sign-out.

  • Web Application
  • Better Auth