WhatsApp-first OTP, passkeys, social login and a full RBAC engine — with DPDP consent and one-prompt AI integration. Free auth, BYO gateways, pay only for the messages you send.
import NexAuth from "@nexauth/sdk";
const auth = new NexAuth({
publishableKey: "pk_live_...", // from dashboard
});
// WhatsApp OTP — one call, done.
await auth.otp.send({ channel: "whatsapp", to: "+91 98XXXXXX01" });
const session = await auth.otp.verify({ channel: "whatsapp",
to: "+91 98XXXXXX01", code: "123456" });
// session.access_token → RS256 JWT, verify offline via JWKSPrices are pass-through messaging costs. BYO gateway = ₹0 per send.
OTP on WhatsApp/SMS/email/voice, passkeys, social, magic links, passwords, QR — all behind one session model with per-tenant RS256 JWTs.
RBAC free forever — roles, permissions, resource-scoped assignments, server-side checks. What Auth0 charges for, bundled.
Purpose-level consent records, withdrawal, Data Principal rights APIs, hash-chained tamper-evident audit trail. Compliance as a feature, not a scramble.
Bulk import with bcrypt/argon2/scrypt/Firebase-scrypt adapters — users keep their passwords. Lazy migration on next login. Zero reset emails.
Keep Firebase/Supabase/Auth0 — add Bharat channels + DPDP on top. Or replace them entirely. Your call, per environment.
MCP server, llms.txt, installable skill — one prompt and your AI agent wires the whole integration.
Nobody else in this market lets you plug in your own SMS/WhatsApp/email provider credentials. NexAuth bills a flat platform fee — your gateway contract stays yours, at your negotiated rates, with your delivery reports.
PUT /v1/admin/gateways/2factor
Authorization: Bearer sk_live_...
{
"credentials": { "api_key": "••••••••", "otp_template": "SIGNIN_OTP" },
"enabled": true
}
→ all sms OTPs now route through YOUR 2Factor account
→ 0 credits consumedUnlimited users, all auth methods, all SDKs — ₹0. Credits only when you send messages.