Supabase phone auth without a built-in provider: the Send SMS Hook, step by step
Supabase ships phone auth with a short list of built-in SMS providers. If the one you want isn't on it, you're not stuck. There's a documented escape hatch called the Send SMS Hook, and it takes about three minutes to wire up. I work at MyOTP.App, so the walkthrough uses us, but the mechanism is the same for anyone who hosts a compatible endpoint. What the hook is Supabase doesn't send SMS. Phone…
Supabase's phone authentication system offers a SMS provider selection, but if the desired provider isn't available, users can utilize the Send SMS Hook for custom SMS delivery. The hook replaces the built-in SMS provider, allowing users to configure their own endpoint to handle SMS delivery. The process involves creating a secret in Supabase, generating a webhook URL in the MyOTP.App dashboard, and pasting the generated URL into Supabase.
No client-side changes are required, and the hook primarily affects SMS delivery. Supabase sends the OTP and phone number to the configured endpoint with a specific JSON format, while the endpoint must respond with a 200 status code and an empty body. The hook's signature is verified using a standardized header format. The hook can be configured to deliver via various channels like WhatsApp or Telegram, and it is useful when dealing with inconsistent delivery in certain countries or when wanting to offer multiple messaging options without modifying the existing authentication system.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.