Auth

The Auth Module built for Maloum

A drop-in authentication flow that handles email/password, 2FA (SMS, TOTP, email) and face verification - with encrypted session vaulting and automatic session refresh.

Full login flow

Handles email/password, all forms of 2FA and face verification in one call.

Session vaulting

Sessions encrypted with AES-256, stored per-tenant, auto-refreshed on expiry.

Drop-in modal

Embed the hosted auth modal in your app with two lines of JS. Themeable.

Zero-ban record

Fingerprints, headers, TLS profile and residential proxies match a real Maloum device.

Multi-account

Add unlimited Maloum accounts to one dashboard without cross-contamination.

Recovery flows

Handle password resets, magic links and locked accounts programmatically.
auth.ts
typescript
import { MaloumAuth } from "@maloumapi/sdk";

const auth = new MaloumAuth({ apiKey: process.env.MALOUM_API_KEY! });

// Opens the hosted modal, returns a persistent account handle.
const { accountId } = await auth.connect({
  onTwoFactorRequired: async () => promptUserFor2FA(),
  onFaceVerification: async (challenge) => showFaceCaptureUI(challenge),
});

// Later, any API call is scoped to that account.
await api.chats.send({ accountId, fanId: "fan_9821", text: "Hi 👋" });

Frequently asked questions

Ready to build on Maloum?

Get API keys, docs and MCP access in one click. Free trial, no credit card.