Archive

#security

2 notes match these filters

  • Next.js in Practice · Part 0715 min read

    Server Actions and Forms

    How 'use server' functions become Server Actions in Next.js 16, from action IDs and encrypted closures in the compiler, through the client dispatch queue and the POST request, to the origin check, body limit and single-roundtrip re-render in action-handler.ts, plus forms with useActionState, useFormStatus, useOptimistic and next/form.

  • Next.js in Practice · Part 2721 min read

    Server-Aware Auth - Sessions, Proxy and the DAL

    A complete cookie-session auth build for Next.js 16, covering encrypted sessions with jose, login and logout Server Actions, an optimistic check in proxy.ts, a Data Access Layer with verifySession, authorization in actions and Route Handlers, unauthorized() and forbidden(), and the rules for auth under Cache Components.