Next.js Cache and Auth Boundary Review
Read authorization and cache tracing only when its checks apply to the task. Project-local copies include a project contract; compare it with current repository settings before relying on it.
Workflow
- Discover installed framework/version, cache configuration, auth capabilities, route handlers, server actions, and repository authority. Read version-matched docs rather than assuming canary behavior.
- Map each relevant read and mutation to its principal, authorization check, data owner, cache key/scope, and invalidation behavior.
- Check authorization at the actual server-side boundary; a hidden UI control or optimistic proxy check alone does not authorize a mutation. Review user-specific data for cross-principal cache reuse.
- Inspect version-specific cookie/header and cache semantics, errors, revalidation, logout/revocation behavior, and evidence for isolation. Do not recommend enabling unused cache/auth features merely to complete the checklist.
- Return findings with exact boundaries and executable isolation tests proposed. If neither relevant caching nor authorization exists, return Not Needed. Do not edit code or contact providers.
Boundaries
Do not install an identity provider, turn on cache configuration, change authorization policy, or make live account requests. Separate documented semantics from observed application behavior.
Evidence and output
Report the authorized scope, applicable settings, observed evidence, result, missing evidence, and next bounded check. Use Not Needed when no applicable authorized work exists and Blocked when a required precondition is missing. Do not substitute required headings for semantic compliance or invent executed checks.
Example
Synthetic example; not an observed client result.
Input: A cached server response includes the current user's profile.
Output: warning: verify that cache identity and lifetime preserve authorization. A client-side login check does not protect a shared cached response.