Authentication for the Web.
This report summarizes scanner evidence for nextauthjs/next-auth, a TypeScript project with 28,376 GitHub stars. SynthScan examined 88,602 lines of code across 819 source files, recording 39 pattern matches distributed across 6 syntactic categories. The legacy adjusted pattern signal is 0.6 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 32 finding(s).
Are imports declared and package/API names verified? 7 finding(s).
Are wrappers, guards, and repeated structures necessary? 7 finding(s).
Which changes need focused human review? 39 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 39 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/next-env.d.ts | 1 | /// <reference types="next" /> | COMMENT |
| LOW | packages/core/src/lib/utils/cookie.ts | 1 | import type { | COMMENT |
| LOW | packages/core/src/lib/actions/callback/handle-login.ts | 261 | // with another user account then we can go ahead and link the accounts safely. | COMMENT |
| LOW | packages/core/src/lib/actions/callback/handle-login.ts | 281 | // better practice to require the user to sign in *then* link accounts to be sure | COMMENT |
| LOW | packages/next-auth/src/react.tsx | 461 | React.useEffect(() => { | COMMENT |
| LOW | apps/examples/qwik/qwik.env.d.ts | 1 | // This file can be used to add references for global types like `vite/client`. | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 1 | import NextAuth from "next-auth" | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 21 | // import Foursquare from "next-auth/providers/foursquare" | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 41 | // import Osu from "next-auth/providers/osu" | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 61 | // import Zitadel from "next-auth/providers/zitadel" | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 81 | // Cognito, | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 101 | // LinkedIn, | COMMENT |
| LOW | apps/examples/nextjs-pages/auth.ts | 121 | // Trakt, | COMMENT |
| LOW | …mples/nextjs-pages/app/api/auth/[...nextauth]/route.ts | 1 | // import { handlers } from "../../../auth" | COMMENT |
| LOW | apps/dev/qwik/qwik.env.d.ts | 1 | // This file can be used to add references for global types like `vite/client`. | COMMENT |
| LOW | apps/dev/nextjs/next-env.d.ts | 1 | /// <reference types="next" /> | COMMENT |
| LOW | apps/dev/nextjs/auth.ts | 1 | import NextAuth from "next-auth" | COMMENT |
| LOW | apps/dev/nextjs/auth.ts | 21 | // export const { handlers, auth, signIn, signOut, unstable_update } = NextAuth( | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/core/src/providers/credentials.ts | 103 | * See the [callbacks documentation](/reference/core#authconfig#callbacks) for more information on how to interact with | COMMENT |
| MEDIUM | packages/frameworks-sveltekit/src/lib/index.ts | 54 | * Remember to set the `AUTH_SECRET` [environment variable](https://kit.svelte.dev/docs/modules#$env-dynamic-private). T | COMMENT |
| LOW | packages/frameworks-express/src/index.ts | 30 | * Don't forget to set the `AUTH_SECRET` environment variable. This should be a minimum of 32 characters, random string. | COMMENT |
| MEDIUM | apps/examples/qwik/src/entry.preview.tsx | 7 | * Feel free to modify this file, but don't remove it! | COMMENT |
| MEDIUM | apps/dev/qwik/src/entry.preview.tsx | 7 | * Feel free to modify this file, but don't remove it! | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/typedoc-nextauth.js | 23 | function injectNextraCalloutImport(app) { | CODE |
| LOW | packages/core/src/lib/utils/webauthn-utils.ts | 176 | export async function getAuthenticationResponse( | CODE |
| LOW | packages/core/src/lib/utils/webauthn-utils.ts | 482 | export function assertInternalOptionsWebAuthn( | CODE |
| LOW⚡ | …meworks-express/test/http-api-adapters/request.test.ts | 7 | function expectMatchingRequestHeaders(req: ExpressRequest, request: Request) { | CODE |
| LOW⚡ | …meworks-express/test/http-api-adapters/request.test.ts | 13 | async function expectMatchingJsonRequestBody( | CODE |
| LOW⚡ | …meworks-express/test/http-api-adapters/request.test.ts | 21 | async function expectMatchingUrlEncodedRequestBody( | CODE |
| LOW | …eworks-express/test/http-api-adapters/response.test.ts | 6 | function expectMatchingResponseHeaders( | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/core/test/webauthn-utils.test.ts | 195 | email: "user@example.com", | CODE |
| LOW | packages/core/test/actions/session.test.ts | 40 | email: "test@test.com", | CODE |
| LOW | packages/core/test/actions/session.test.ts | 45 | email: "test@test.com", | CODE |
| LOW | packages/core/test/actions/session.test.ts | 134 | email: "test@test.com", | CODE |
| LOW | packages/core/test/actions/session.test.ts | 160 | email: "test@test.com", | CODE |
| LOW | packages/core/test/actions/session.test.ts | 233 | email: "test@test.com", | CODE |
| LOW | packages/frameworks-express/test/session.test.ts | 7 | name: "John Doe", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/frameworks-solid-start/src/index.ts | 76 | * ## Creating the API handler | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/next-auth/src/react.tsx | 470 | // more robust to have each window/tab fetch it's own copy of the | COMMENT |