Add Scalekit hosted auth to a Next.js app
The Next.js App Router runs auth on the server, but Scalekit’s framework-agnostic guides assume Express-style request and response objects. This cookbook maps the full hosted-login flow — redirect, code exchange, session cookies, refresh, and logout — onto Route Handlers, Server Components, and middleware.