Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@farm.js/authjs

Latest version: v0.1.86

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: kinfish
746 Stars
23 Forks
161 Versions
8.3K Downloads
TypeScript Repo language

Scan summary

@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.

  • Releases: 161 versions; the latest 5 were published on 24 Nov 2026.
  • Findings: No rules fired in version 0.1.86.
  • Downloads: 8,283 downloads.

Versions

161 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 0.1.86

Findings

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.

README

The publisher’s own README, as collected from the registry.

@farm.js/authjs

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.

Install

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.

Create the Auth.js instance

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.

Register it

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.

Sessions and protection

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.

Options

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.

Documentation

Report issues and find examples in the Farm.js repository.

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @farm.js/authjs

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229