AuthmapSee your Next.js auth flow at a glance — and catch the bugs that hide in it. Authmap is a VS Code extension that maps out how authentication actually works across your Next.js app: which routes are protected, which are public, which are ambiguous, and where your middleware might be lying to you. It starts with first-class support for Better Auth. The problemIn a Next.js app, "is this route protected?" is a question whose answer is scattered across three different files that never talk to each other:
Nothing cross-references these for you. So bugs like these ship quietly and get found in production:
Authmap reads your actual code and tells you which of these you have, before your users find them for you. What it shows you🗺️ Route tree, grouped by confidenceEvery page, layout, and route handler in your
Click any route to jump straight to the file. ➡️ Request flow stripA quick visual: ⚠️ Inline warningsFindings show up as real VS Code diagnostics — squiggles in your editor, entries in the Problems panel — not just a separate panel you have to remember to check. Run Authmap: Explain This Warning from the Command Palette for the full reasoning behind any finding, including how to fix it. 🔌 OAuth providers panelShows which social providers (Discord, Google, GitHub, etc.) are declared in your Better Auth config, so you don't have to go hunting through it to remember what's wired up. How it worksAuthmap is entirely static — it reads your source files, it doesn't run your app or your dev server. It:
Nothing leaves your machine — there's no network call, no telemetry, no uploading your code anywhere. Getting started
If nothing shows up, check that your middleware/proxy file and auth config are in one of the conventional locations (project root, Requirements
Known limitations (v1)Authmap is intentionally static-analysis-only for now — it won't catch a bug that only shows up when your app is actually running, and it can't see values that come from another file it wasn't able to resolve (e.g. providers imported from elsewhere, matchers built dynamically at runtime). It's built to catch the common, structural bugs — not to replace testing. Support for auth libraries beyond Better Auth, and runtime-aware checks, are on the roadmap. FeedbackFound a false positive, a bug pattern Authmap should catch but doesn't, or something that just looks wrong? Open an issue — this is early, and real usage is what makes the ruleset better. LicenseMIT |