Phone sign-in is how many users in India expect to log in. Supabase Auth generates and checks the codes; you just need to deliver them. Supabase's built-in SMS providers don't cover every country's rules well, and none send WhatsApp, so Supabase lets you take over delivery with a Send SMS hook . This guide wires that hook to MSG91 , which handles Indian SMS regulations and WhatsApp.
How it works
A user enters their phone number; your frontend calls supabase.auth.signInWithOtp({ phone }) .
Supabase generates a six-digit code and calls your hook over HTTPS with the phone number and code.
Your FastAPI endpoint verifies the request came from Supabase and sends the code through MSG91.
The user types the code; supabase.auth.verifyOtp({ phone, token, type: "sms" }) signs them in.
1. Get your MSG91 auth key
Sign up at MSG91 and copy your authkey from the dashboard. Every API call sends it in an authkey header.
MSG91_AUTH_KEY=...
Enter fullscreen mode
Exit fullscreen mode
2.β¦