Zindua for Supabase
Auth email and WhatsApp from Edge Functions. Plug into Supabase Auth Hooks or your own OTP store. Supabase verifies, you send from your Gmail and WhatsApp. Guide v1.0.0.
Auth Hooks
Drop-in Send Email / Send SMS hooks. Supabase verifies; Zindua delivers.
WhatsApp as SMS
No Twilio required. Map phone OTP to WhatsApp on your Zindua line.
BYO email
Send from your Gmail / SMTP / Outlook - not a locked ESP network.
Custom OTP store
Optional Track B: hash OTP in Postgres + Edge Functions you control.
Server-only keys
ZINDUA_API_KEY lives in Edge secrets. Never NEXT_PUBLIC_.
One-click Connect
Dashboard → Integrations → Connect to Supabase. OAuth pushes Edge secrets for you.
Connect in one click
Pick a step. Screenshots of Integrations, then the Supabase authorize screen. Tap Zoom.
Track A or Track B
Same Zindua send API. Different ownership of OTP verify.
Track A - Auth Hooks
Recommended for AuthSupabase generates and verifies OTP / magic links. Your Edge Function only calls POST /send.
When: signInWithOtp, recovery, confirm signup, phone Auth
examples/supabase-auth-hooks
Download zipTrack B - Custom OTP
WhatsApp-firstYou hash OTP in Postgres, send via Zindua, verify in Edge. Full control outside Phone Auth.
When: Custom login, multi-tenant B2B, WhatsApp without Supabase Phone
examples/supabase-otp
Download zipPick a snippet
Edge send, secrets, Auth Hooks, Postgres, or client invoke. Same Zindua send().
// Deno Edge - prefer fetch (SDK is Node-oriented)const res = await fetch("https://zindua.run/api/v1/send", { method: "POST", headers: { Authorization: `Bearer ${Deno.env.get("ZINDUA_API_KEY")}`, "Content-Type": "application/json", }, body: JSON.stringify({ to: "user@example.com", template: "otp-verification", channel: "email", variables: { code: "482910", otp: "482910" }, }),});Setup, secrets, compare
Step through setup, then secrets, Resend, errors, and security.
Step 1
Create a Zindua project
Dashboard → project → copy znd_live_ / znd_test_ key. Connect email Service and/or WhatsApp QR. Create template otp-verification with {{code}}.
Step 2
Pick Track A or B
Auth Hooks if you want native Supabase Auth. Custom OTP if you own the store and want WhatsApp-first without Phone Auth.
Step 3
Deploy Edge Functions
Copy the starter into your Supabase repo. Set secrets. Deploy with supabase functions deploy.
Deploy
supabase functions deployCopy the starter into your Supabase repo, set secrets, then deploy.
Step 4
Wire & test
Enable hooks in Auth settings (Track A) or invoke send-otp (Track B). Confirm delivery in Zindua Logs.
Before you deploy
Checklist
Confirm project, Service, template, and optional WhatsApp before Edge deploy.
- Project created + API key copied
- Email Service connected (Gmail / SMTP / Outlook)
- Template otp-verification with {{code}} (+ {{otp}}, {{appName}})
- Optional: WhatsApp QR scanned for phone / Track B WA
- Optional: webhook URL → zindua-webhook Edge Function
Ready to wire Supabase?
Connect from the dashboard to push Edge secrets, or download a starter and deploy Auth Hooks yourself.