Autentikasi ing App Router naglalaman ing sawetahe layer — session, middleware, server-side check, lan protection ing Server Actions. Cara modern niku sumusuporta server-side session verification tinimbang client-only check.
Kapan penting
Sesi strategi
Cookie-based sessions (httpOnly cookie):
✓ Store a signed session id or encrypted JWT in an httpOnly, secure cookie
✓ httpOnly = not readable by JavaScript → protects against XSS token theft
✓ Use a library: Auth.js (NextAuth), Clerk, Lucia, or a custom solution
