superun SMS Provider
This guide explains how to integrate SMS phone authentication using superun Cloud. When superun Cloud is running, phone login is automatically enabled and all necessary auth hook configurations are handled for you.Overview
superun Cloud automatically handles SMS authentication setup:- Automatic phone login activation: Phone authentication is enabled when superun Cloud starts
- Pre-configured auth hooks: The
send_smshook is automatically configured and connected to superun Gateway - No manual configuration needed: You don’t need to create Edge Functions or configure auth hooks manually
- Ready to use: Simply integrate the client-side authentication flow in your application
Client Integration
Integrate the SMS authentication flow in your client application. This is the frontend integration logic that users interact with:- User clicks “Send Verification Code”: Call
sendOTP(phone)to trigger the SMS sending. superun Cloud automatically handles the SMS delivery via the pre-configured auth hook. - User enters verification code and clicks “Login”: Call
verifyOTP(phone, token)to verify the code and complete authentication.
How It Works
- User initiates SMS authentication: When a user requests phone authentication via
signInWithOtp(), Supabase generates an OTP - Auth hook is automatically triggered: superun Cloud’s pre-configured
send_smshook intercepts the authentication event - SMS is sent automatically: The hook sends the SMS verification code using superun Gateway
- User verifies code: The user enters the code, and
verifyOtp()completes the authentication process
All backend infrastructure (Edge Functions, auth hook configuration, webhook verification, and SMS gateway integration) is automatically handled by superun Cloud. You only need to implement the client-side authentication flow shown above.

