
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.
better-auth-waitlist
Advanced tools
A lightweight Better Auth plugin for waitlist management with admin approval workflows, domain restrictions, and customizable validation.
A production-ready Better Auth plugin that provides a comprehensive waitlist system with admin approval workflows, domain restrictions, and customizable validation.
💡 Inspired by: Better Auth Kit Waitlist Plugin - This implementation follows similar patterns and conventions.
📦 Lightweight & Optimized
| Metric | Size |
|---|---|
| Minified | ~22 kB |
| Gzipped | ~3.5 kB |
| Dependencies | 1 (zod only) |
| Modules | ESM |
💡 Tip: Check the impact on your bundle with Bundle Analyzer or use
npm lsto see the dependency tree.
npm install better-auth-waitlist
or
pnpm add better-auth-waitlist
or
yarn add better-auth-waitlist
import { betterAuth } from "better-auth";
import { waitlist } from "better-auth-waitlist";
export const auth = betterAuth({
plugins: [
waitlist({
enabled: true,
allowedDomains: ["@example.com", "@company.org"],
maximumWaitlistParticipants: 1000,
}),
],
});
Create the waitlist table:
npx @better-auth/cli migrate
import { createAuthClient } from "better-auth/react";
import { waitlistClient } from "better-auth-waitlist/client";
export const authClient = createAuthClient({
baseURL: process.env.NEXT_PUBLIC_AUTH_URL,
plugins: [waitlistClient()],
});
// Join the waitlist
const result = await authClient.waitlist.join({
email: "user@example.com",
department: "Engineering",
name: "Jane Smith",
additionalInfo: "Need access to internal tools",
});
// Check waitlist status
const status = await authClient.waitlist.checkStatus({
email: "user@example.com"
});
// Admin operations (requires admin role)
const entries = await authClient.waitlist.list();
const entry = await authClient.waitlist.findOne({ id: "entry-id" });
// Approve/reject entries (admin only)
await authClient.waitlist.approve({ id: "entry-id" });
await authClient.waitlist.reject({ id: "entry-id" });
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable/disable the waitlist |
allowedDomains | string[] | undefined | Restrict to specific email domains |
maximumWaitlistParticipants | number | undefined | Set capacity limits |
additionalFields | Record<string, FieldAttribute> | {} | Extend schema with custom fields |
autoApprove | boolean | function | false | Auto-approve based on criteria |
validateEntry | function | undefined | Custom validation hooks |
onStatusChange | function | undefined | Status change callbacks |
disableSignInAndSignUp | boolean | false | Complete waitlist mode |
| Option | Type | Default | Description |
|---|---|---|---|
onJoinRequest | function | undefined | Callback when new requests are submitted |
canManageWaitlist | function | undefined | Custom function to check admin permissions |
rateLimit | object | undefined | Rate limiting configuration |
notifications | object | undefined | Notification settings |
POST /api/auth/waitlist/join - Join the waitlistGET /api/auth/waitlist/list - List waitlist entries (admin only)GET /api/auth/waitlist/request/find - Find specific waitlist entry (admin only)GET /api/auth/waitlist/request/check-status - Check waitlist status by emailPOST /api/auth/waitlist/request/approve - Approve entry (admin only)POST /api/auth/waitlist/request/reject - Reject entry (admin only)waitlist({
enabled: true,
validateEntry: async ({ email, additionalData }) => {
// Custom business logic
return email.includes("admin") || additionalData?.priority === "high";
},
onStatusChange: async (entry) => {
// Send notification emails
console.log(`Entry ${entry.id} status changed to ${entry.status}`);
},
onJoinRequest: async ({ request }) => {
// Handle new join requests
console.log(`New request from ${request.email}`);
},
});
waitlist({
enabled: true,
additionalFields: {
department: {
type: "string",
required: true,
},
reason: {
type: "string",
required: false,
},
},
});
🚀 Major Architectural Refactoring
error-codes.ts - HTTP status codes and error handlingclient.ts - Simplified client pluginschema.ts - Enhanced Zod schemastypes.ts - TypeScript type definitionsThis refactor makes the plugin much more maintainable and follows established Better Auth plugin conventions.
MIT
This plugin was inspired by the Better Auth Kit Waitlist Plugin and follows similar architectural patterns and conventions established by the Better Auth ecosystem.
Issues and pull requests are welcome! Please ensure your contributions follow the existing code style and include appropriate tests.
FAQs
A lightweight Better Auth plugin for waitlist management with admin approval workflows, domain restrictions, and customizable validation.
The npm package better-auth-waitlist receives a total of 154 weekly downloads. As such, better-auth-waitlist popularity was classified as not popular.
We found that better-auth-waitlist 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.