Common Errors and Fixes
CLIENT_FETCH_ERROR: inspect /api/auth/session, the route, and base URL. Secret errors: set NEXTAUTH_SECRET in the active environment. OAuth callback failure: verify client ID/secret, exact callback URI, NEXTAUTH_URL, and proxy headers. Credentials always fail: check backend URL, request body, response status, and required user.id/user.email. Session fields missing: check both jwt and session callbacks and confirm SessionProvider wraps the app. Redirect loop: ensure the sign-in page is public.