Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implements and reviews Auth.js authentication and authorization in Next.js App Router projects, enforcing server-side access checks.
92% 100%+8 ptsof test cases passed
Passed 24 of 24 test cases with the skill, and 22 of 24 without it.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Integrate Auth.js through the project's existing server boundaries without treating session presence as sufficient authorization.
Identify installed versions, adapter, session strategy, providers, route structure, runtime, deployment platform, database, existing user model, and authorization rules. Do not replace another authentication system unless migration is explicitly in scope.
Auth.js and Next.js APIs change. Use examples from current official documentation that match the installed versions rather than remembered configuration.
Use authentication to establish identity. Enforce authorization at every protected server entry point and data operation using roles, permissions, ownership, organization membership, or policy appropriate to the domain. Client-side guards improve UX but are not a security boundary.
Centralize authorization decisions where practical and deny by default. Avoid embedding mutable entitlements in long-lived session state without a refresh or revocation strategy.
Define where session lookup is safe and cacheable, how server components and route handlers access identity, how middleware is used, and which checks must still occur in the trusted handler or service. Avoid protecting only page navigation while leaving APIs exposed.
Model loading, unauthenticated, forbidden, expired, provider error, account collision, and partial onboarding states explicitly.
Test sign-in, sign-out, expiration, refresh, protected routes, server actions or handlers, ownership, roles, revoked access, provider denial, callback tampering, redirect validation, CSRF-sensitive actions, and concurrent sessions. Confirm cookie flags and production origins in the deployed environment.
Document the chosen session and authorization model, current version assumptions, and unverified provider behavior.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.