Scan your whole stack
Are you using @farm.js/authjs?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.86
@farm.js/authjs was last scanned on 24 Nov 2026 at version 0.1.86. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.86 LATEST | 24 Nov 2026 | No rules fired |
| 0.1.85 | 24 Nov 2026 | No rules fired |
| 0.1.84 | 24 Nov 2026 | No rules fired |
| 0.1.83 | 24 Nov 2026 | Not shown |
| 0.1.82 | 24 Nov 2026 | Not shown |
Findings for v0.1.86. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.86; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Auth.js route mounting for Farm.js applications. Pass an application-owned Auth.js object and Farm
mounts its GET and POST handlers at /api/auth/[...nextauth]. Auth.js keeps owning providers,
callbacks, cookies, and sessions; Farm does not reimplement any of it.
See Stability and Support for what this package guarantees.
pnpm add @farm.js/authjs @auth/core
This package has no Auth.js dependency of its own. The application installs Auth.js and the
provider packages it uses. farm add integration authjs --ui adds @auth/core, writes a GitHub
OAuth instance to src/lib/auth.ts, and registers it.
The adapter needs one thing from the instance: a handlers object with GET and POST functions
that take a Request and return a Response. With @auth/core:
// src/lib/auth.ts
import { Auth } from "@auth/core";
import GitHub from "@auth/core/providers/github";
const config = {
// Auth.js parses actions relative to this path, so it matches the route Farm mounts.
basePath: "/api/auth",
providers: [
GitHub({
clientId: process.env.AUTH_GITHUB_ID!,
clientSecret: process.env.AUTH_GITHUB_SECRET!,
}),
],
secret: process.env.AUTH_SECRET,
trustHost: true,
};
const handler = (request: Request) => Auth(request, config);
export const auth = {
handlers: {
GET: handler,
POST: handler,
},
};
The object returned by NextAuth(...) also has this shape and can be passed directly.
import { defineConfig } from "@farm.js/core";
import { authjs } from "@farm.js/authjs";
import { auth } from "./src/lib/auth";
export default defineConfig({
integrations: {
auth: authjs({
instance: auth,
}),
},
});
Farm mounts one catch-all route:
GET /api/auth/[...nextauth]
POST /api/auth/[...nextauth]
Requests such as /api/auth/session, /api/auth/signin, and /api/auth/callback/<provider> reach
that route and are delegated to Auth.js. Register provider callback URLs under
/api/auth/callback/<provider>.
| Request | Behavior |
|---|---|
GET under the catch-all path |
Delegated to instance.handlers.GET. |
POST under the catch-all path |
Delegated to instance.handlers.POST. |
| Method with no matching handler | 405 Method Not Allowed with Allow. |
There is no generated api.auth caller for this integration and no protectedRoutes option. Read
the session through Auth.js. In the browser, its own endpoint works:
const response = await fetch("/api/auth/session", { credentials: "include" });
const session = await response.json();
Protect pages with your Auth.js setup or with Farm middleware that checks the session, then apply the app's own authorization rules to each resource.
| Option | Required | Notes |
|---|---|---|
instance |
Yes | Object with handlers.GET and handlers.POST. |
log |
No | Integration lifecycle and route logger. |
Provider credentials, adapters, callbacks, events, and session settings all belong in the Auth.js
configuration. AUTH_SECRET and every provider credential must be set in production.
Use only one auth owner per app: either this integration or top-level Farm Auth (auth: true),
which ships as @farm.js/auth and needs no
provider setup.
Report issues and find examples in the Farm.js repository.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.