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
typescriptimport { 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 👋" });