Technical Diagnostic
A focused review to establish what is happening, where the risk sits, and what should happen next, ending with a prioritised plan the team can take into delivery.
This is for production authentication failures, not a general NextAuth explainer. The flow works locally or in preview, then real users hit redirect loops, failed callbacks, missing sessions, or protected routes that behave differently on the live domain.
Stabilise production authentication when NextAuth works locally or in preview, but the live deployment breaks around callbacks, cookies, middleware, sessions, or redirects.
NextAuth failures often appear only in production because the real domain, protocol, callback URLs, OAuth provider settings, secure cookies, middleware, environment variables, and protected routes are finally in play together. The auth provider is not automatically the cause. A reliable fix follows one failing production journey end to end and proves whether the fault sits in auth configuration, deployment environment, routing, middleware, cookies, or application state.
This is for teams whose auth flow works locally or in preview but fails for real users. I focus the decision on whether the next step is auth triage, deployment and environment review, protected‑route debugging, auth‑flow review, or broader production stability work.
A focused review to establish what is happening, where the risk sits, and what should happen next, ending with a prioritised plan the team can take into delivery.
A short, concentrated engagement to isolate a defined problem, stabilise the immediate situation, and move the first fixes into delivery.
Senior hands‑on support inside an existing team when architecture, implementation, review, and delivery decisions need to stay connected.
Stabilise a Next.js production incident after deploy when the app works locally but the live site is now broken, inconsistent, or only failing against production conditions.
Fix content not updating and stale pages before ISR or revalidation problems make live freshness unpredictable for teams and users.
Untangle App Router caching, stale data, RSC boundaries, mutation paths, and invalidation problems when production behaviour no longer matches the team's expectations.
Debug Vercel deployment paths where local, preview, build, and production behaviour diverge around logs, environment variables, middleware, cache, runtime behaviour, or failing routes.
Senior platform assessment and technical direction for React and Next.js estates where routing, CMS, deployment, SEO, ownership, and delivery risk have become one problem.
Define Next.js platform boundaries when domains, routes, tenants, brands, content ownership, data ownership, deployment models, or team responsibilities are making change unsafe.
Debug live Next.js estates where slow routes, stale data, hydration faults, scripts, cache behaviour, or deployment history are now affecting real users and release confidence.

How to debug NextAuth when it works locally but fails in production, covering callback URLs, cookies, secrets, middleware, providers, and Vercel.

Timing attacks explained for web developers, including side channels, string comparisons, real examples, and practical defences in JavaScript.

A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.

Protect Next.js routes with Proxy, formerly Middleware, using authentication, authorisation, matchers, API request checks and current terminology.

When you set up a custom domain in Vercel, the default `vercel.app` subdomain still serves your site, which can lead to duplicate content. Here's how to fix it.