The Next.js template keeps auth tokens out of browser-managed storage. Browser state may cache a safe user summary, but the backend session token belongs in the HttpOnly tenant cookie.
Supported entry points
/loginand/auth/login/auth/register/auth/verifyand/auth/verify-email/auth/forgot-passwordand/auth/reset-password/auth/callbackfor GitHub OAuth- guest login and
/auth/guest-convert
Cookie-setting handlers
Handlers that can receive a token from the backend should pass through authCookieJsonResponse. That removes token fields from the JSON response and sets the tenant cookie.
Server-side session
The dashboard layout resolves the session on the server: authenticated users render the dashboard, anonymous users redirect to /login with a redirect param, and an expired access token falls through to a client-side refresh before deciding.
Account surface
/dashboard/settings holds Profile (?tab=profile: profile updates, password changes, guest conversion prompts) and API keys (?tab=keys). Legacy /profile, /dashboard/profile and /dashboard/keys redirect there with their query.