Scan your whole stack
Are you using @xeplr/auth?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.8.0
@xeplr/auth was last scanned on 29 Nov 2026 at version 1.8.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
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 } }
npm i @xeplr/auth
Peer: express ^4 || ^5. Needs PostgreSQL (migration 0001 runs CREATE EXTENSION pgcrypto) and Redis.
REDIS_PREFIXis required. Set one of your own, e.g.REDIS_PREFIX=myapp:. It may not be unset, and may not be the shared defaultxeplr:— why. Apps upgrading from an earlier version must add it, or the service will not start.
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():
REDIS_PREFIX (refuses if missing or xeplr:);XEPLR_AUTH_MIGRATIONS;AUTH_PORT (default 19001) with /auth/api and /auth/api/admin mounted;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()
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
| 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 |
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.
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.