
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@parsrun/auth
Advanced tools
Passwordless-first, multi-runtime authentication for Pars framework.
pnpm add @parsrun/auth
import { createAuth } from '@parsrun/auth';
const auth = createAuth({
secret: process.env.AUTH_SECRET,
adapter: myDatabaseAdapter,
providers: {
otp: {
email: {
send: async (to, code) => {
await sendEmail(to, `Your code is: ${code}`);
},
},
},
},
});
await auth.initialize();
// Request OTP
await auth.requestOTP({ identifier: 'user@example.com', type: 'email' });
// Sign in
const result = await auth.signIn({
provider: 'otp',
identifier: 'user@example.com',
credential: '123456',
data: { type: 'email' },
});
| Export | Description |
|---|---|
createAuth(config) | Create auth instance |
ParsAuthEngine | Main auth engine class |
| Export | Description |
|---|---|
OTPProvider | Email/SMS OTP authentication |
MagicLinkProvider | Magic link authentication |
GoogleProvider | Google OAuth |
MicrosoftProvider | Microsoft OAuth |
GitHubProvider | GitHub OAuth |
AppleProvider | Apple Sign In |
TOTPProvider | 2FA with authenticator apps |
WebAuthnProvider | Passkeys/WebAuthn |
import {
createAuthMiddleware,
requireRole,
requirePermission,
requireTenant,
requireAdmin,
} from '@parsrun/auth';
const authMiddleware = createAuthMiddleware({ auth });
app.get('/admin', authMiddleware, requireAdmin(), handler);
app.get('/users', authMiddleware, requireRole('admin', 'manager'), handler);
app.get('/data', authMiddleware, requirePermission('data:read'), handler);
| Export | Description |
|---|---|
JwtManager | JWT token management with rotation |
SessionBlocklist | Token revocation |
extractBearerToken() | Extract token from header |
| Export | Description |
|---|---|
createStorage() | Auto-detect runtime storage |
MemoryStorage | In-memory (development) |
RedisStorage | Redis/Upstash |
CloudflareKVStorage | Cloudflare KV |
DenoKVStorage | Deno KV |
| Export | Description |
|---|---|
RateLimiter | Request rate limiting |
LockoutManager | Account lockout |
CsrfManager | CSRF protection |
AuthorizationGuard | Role/permission checks |
import { ... } from '@parsrun/auth'; // Main exports
import { ... } from '@parsrun/auth/storage'; // Storage adapters
import { ... } from '@parsrun/auth/session'; // Session management
import { ... } from '@parsrun/auth/security'; // Security utilities
import { ... } from '@parsrun/auth/providers'; // Auth providers
import { ... } from '@parsrun/auth/adapters'; // Framework adapters
MIT
FAQs
Passwordless-first, multi-runtime authentication for Pars framework
The npm package @parsrun/auth receives a total of 20 weekly downloads. As such, @parsrun/auth popularity was classified as not popular.
We found that @parsrun/auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.