A flexible Multi-Factor Authentication kit for Next.js, Express, and Cloudflare applications
npm install @bhattishani/mfa-kitbash
pnpm add @bhattishani/mfa-kit
`
Features
- 🔐 Multiple authentication factors
- Time-based One-time Passwords (TOTP)
- One-time Passwords (OTP)
- PIN codes
- Passkeys (WebAuthn)
- 🚀 Framework adapters
- Next.js
- Express
- Cloudflare
- ⚡️ Type-safe APIs
- 🔄 Flexible flow management
- 📦 Zero configuration required
Usage
$3
`typescript
import { createMFAKit } from "@bhattishani/mfa-kit";
import { NextjsAdapter } from "@bhattishani/mfa-kit/adapters/nextjs";
const mfa = createMFAKit({
adapter: new NextjsAdapter(),
// ... your configuration
});
`
$3
`typescript
import { createMFAKit } from "@bhattishani/mfa-kit";
import { ExpressAdapter } from "@bhattishani/mfa-kit/adapters/express";
const mfa = createMFAKit({
adapter: new ExpressAdapter(),
// ... your configuration
});
`
$3
`typescript
import { createMFAKit } from "@bhattishani/mfa-kit";
import { CloudflareAdapter } from "@bhattishani/mfa-kit/adapters/cloudflare";
const mfa = createMFAKit({
adapter: new CloudflareAdapter(),
// ... your configuration
});
``