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

@xeplr/auth

Latest version: v1.8.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: xeppie
0 Stars
0 Forks
27 Versions
2.4K Downloads
JavaScript Repo language

Scan summary

@xeplr/auth was last scanned on 29 Nov 2026 at version 1.8.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 27 versions; the latest 3 were published within 2 days (28 and 29 Nov 2026).
  • Findings: No rules fired in version 1.8.0.
  • Downloads: 2,373 downloads.

Versions

27 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.8.0 LATEST 29 Nov 2026 No rules fired
1.7.0 29 Nov 2026 No rules fired
1.6.1 28 Nov 2026 No rules fired
1.6.0 19 Nov 2026 Not shown
1.5.3 12 Nov 2026 Not shown

No rules fired in 1.8.0

Findings

Findings for v1.8.0. 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 1.8.0; other versions have their own rules, not their own score.

README

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

@xeplr/auth

The sign-in service for xeplr apps. Register, activate, log in, forgot / reset password, invites, and sessions made of a short-lived access token plus a refresh token — kept in Redis, with an optional sliding refresh that hands back a new token in the X-New-Token response header. It also owns the RBAC catalog — roles, apis, uiPages, uiElements and menus, each mapped to roles and each (except elements) with an isPublic flag — and records multi-tenant membership in userTenantsMapping, which mtMembershipMiddleware enforces. Data lives in PostgreSQL; sessions and the access cache live in Redis.

POST /auth/api/login   { email, password }
→ { accessToken, refreshToken, user, access: { roles, pages, apis, menus, menuItems, elements } }

Install

npm i @xeplr/auth

Peer: express ^4 || ^5. Needs PostgreSQL (migration 0001 runs CREATE EXTENSION pgcrypto) and Redis.

REDIS_PREFIX is required. Set one of your own, e.g. REDIS_PREFIX=myapp:. It may not be unset, and may not be the shared default xeplr: — why. Apps upgrading from an earlier version must add it, or the service will not start.

Two ways to run it

As its own service: xeplr-auth-server
"start-auth": "dotenv -e development.env -- xeplr-auth-server"

bin/server.js calls boot(). It reads process.env only and loads no .env file — the launcher provides the environment. boot():

  1. checks REDIS_PREFIX (refuses if missing or xeplr:);
  2. checks Redis is reachable (refuses if not);
  3. runs auth's own migrations, then the directories in XEPLR_AUTH_MIGRATIONS;
  4. configures email from env and checks it can send (never fatal);
  5. starts Express on AUTH_PORT (default 19001) with /auth/api and /auth/api/admin mounted;
  6. prints a banner of the effective configuration.

When run under a parent process (process.send exists), it sends { status: 'ready' } once listening.

To register hooks, write your own boot file — hooks only fire in the process that does the work:

var auth = require('@xeplr/auth')
auth.hooks.on('user', 'create', async function(userId) { /* … */ })
auth.boot()
In your own process
var auth = require('@xeplr/auth')

await auth.init({
  database: 'myapp_auth',                                  // or AUTH_DB_NAME, default 'auth'
  connection: process.env.XEPLR_DB_CONNECTION,             // encrypted string, or { host, port, user, password }
  jwt: { secret: process.env.AUTH_JWT_SECRET, accessTokenExpiresIn: '15m' },
  email: { provider: 'smtp', smtp: { /* … */ } }           // optional
})

app.use('/auth/api', auth.router({ resetBaseUrl: 'https://app.example.com' }))
app.use('/auth/api/admin', auth.adminRouter())

init() checks REDIS_PREFIX but does not check Redis, run migrations, or print the banner — run xeplr-auth-migrate yourself. It binds the auth models as the process-wide default connection; a process with its own database should use attach() instead, which opens a secondary connection. Pass jwt.accessTokenExpiresIn to match AUTH_ACCESS_TOKEN_TTL_MINUTES — without jwt the token lifetime is 15m while the session entry in Redis follows the env value.

To act on auth tables from another service (invite a user, assign roles) while auth itself runs standalone:

var auth = require('@xeplr/auth').attach()           // AUTH_DB_NAME + the connection env
await auth.ready()
await auth.model('UserRolesMapping').query().insert({ /* … */ })
await auth.service.invite({ email, name, invitedBy, inviterName, appName })  // → { id, isNew, isActivated, resent? } — not yet activated: the invite goes again

Exports

export
boot() the standalone service, env-driven, as above; resolves to the http.Server
start(config) init(config) + Express on config.port with both routers; no Redis check, no migrations, no banner
init(config) connect and bind the models, configure JWT and email; checks REDIS_PREFIX
attach() secondary connection to the auth database from another process: { ready, conn, model(name), service, internalTokenFor(userId, { ttl }) }
createInternalToken(user, { ttl }) an internal token: the server calling its own API as user ({ id, email, name, roles })
router(options) the /auth/api router; options.resetBaseUrl sets where reset links point
adminRouter() the /auth/api/admin router
authMiddleware Bearer token check against the Redis session; sets req.user; slides within tolerance. An internal token is served as the user it acts as
accessMiddleware(options) per-API RBAC from the apis catalog — see Access checks
requireRole(...names) 403 unless req.user.roles holds one of the names; use after authMiddleware
mtMembershipMiddleware(options) 403 when a tenant header names a value the caller has no membership for
authService register, activate, invite, previewInvite, acceptInvite, login, forgotPassword, resetPassword, profile, phone OTP, changePassword, configureActivation, configureEmail
signInSteps other ways in: settings, checkSettings, signInOptions, requestSignInCode, verifySignInCode, afterFirstStep, sendSecondStepCode, verifySecondStep, twoFactorStatus, startAuthenticator, confirmAuthenticator, chooseMethod, resetTwoFactor(userId, adminId), cleanPhone, findByVerifiedPhone
catalogCheck recordRoutes, listRoutes, buildCatalog, loadCatalog, findGaps — is every route in the catalog?
accessService getUserAccess, userApiState, userHasApiAccess, apiStateFor, ACCESS_STATES, getApiRule, getPublicItems, clearUserAccess, clearAccessRules, clearAllAccess
sessionService createSession, getSession, validateAccessToken, slideAccessToken, rotateSession, destroySession, destroyAllUserSessions
ticketService issueTicket, consumeTicket — single-use 30-second tickets for SSE / WebSocket
authHelper configure, hashPassword, comparePassword, generateAccessToken, verifyToken, decodeVerified, generateId, …
hooks on(identifier, event, fn), fire, setHooksEnabled
licence use({ modulesFor }): which sold modules a user may use — see Licensed modules
seedSuperAdmin(knex, { email, password, name? }) insert-if-absent super admin user + role mapping, for apps seeding from JS
configureWorkflowResume(fn) hand in @xeplr-workflow/api's resumeByKey; activation with a workflowKey then resumes that workflow (best-effort)
requiredEnv the env names this package needs, for an app's env.required.js; requiredEnv.activationLinkVar names the activation-link variable in use
models Objection models: User, Role, Api, UiPage, UiElement, Menu, the five *RolesMapping, UserTenantsMapping

Environment

Required

Everything in requiredEnv, plus a connection. requiredEnv includes the sign-up settings — AUTH_REGISTER_ROLES, AUTH_ACTIVATION_URL and AUTH_RESET_URL — so an app that spreads it into its env.required.js refuses to start (and check-env fails) without them: the sign-in service would run, but nobody new could get in. The two link settings are asked for as AUTH_ACTIVATION_BASE_URL instead when an install uses that older form. Started without them anyway, each flow refuses with 503 naming the variable, and the banner shows ✗ NOT SET.

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 @xeplr/auth

References

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

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

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

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

Vulnerability Insights

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

Frame 2085668439 (1)
Group 1261154229