Sessions in Next.js
What a session is, how to store and decode the token issued by the backend in an httpOnly cookie, keep the user, their role and their permissions in Redux, and what 'use server' is in Next.js.
Protected routes in Next.js
How to protect routes and actions in Next.js with three independent layers: proxy.ts, the DAL with requireSession and requirePermission, and Server Actions. Includes permissions in the token, splitting the page into server and client, and the limits of what the front end can guarantee.
Error handling in Next.js
Error handling in Next.js: expected and unexpected errors, the journey of an error in the login with Redux and Server Actions, error.tsx and global-error.tsx, notFound, redirect, unauthorized and forbidden.
Week Slides
Review the Week 14 slides on cookie sessions, use server, protected routes and error handling in Next.js.