Phone OTP via Twilio
Setup
| Setting | Value |
|---|---|
| Provider | Twilio Verify |
| Account SID | AC0c625531415b26dc8e4e739d3375aa45 |
| Verify Service SID | VAd5c53f07d6136abee3e95bb267ee6969 |
| OTP Expiry | 300 seconds |
| Cost | $0.05 per verification |
| Phone Number | None required (Verify service handles delivery) |
Configured in Supabase project elopzpfftytxncfyutju under Authentication > Phone provider.
How It Works
- User enters phone number on login page (country codes: Honduras
+504, US+1) - Supabase calls Twilio Verify to send SMS OTP
- User enters 6-digit code
- Supabase verifies via Twilio and creates/signs in user
New User Profile Flow
Phone users have no email or name metadata from auth. On first login:
- Login page checks if user has
full_name,name, oremailin auth metadata - If not, fetches DB profile to check for saved username
- If no username exists, redirects to
/profileinstead of/restaurants - Profile page auto-enters edit mode with “Complete your profile” banner
Username Persistence Fix
syncUserProfile in AuthContext.tsx was overwriting saved usernames with blank for phone users (no auth metadata). Fixed by only setting username in the patch when auth metadata provides one.
Current Status
- Configured and deployed — Twilio upgraded from trial, working in production
- Country codes: Honduras (+504), United States (+1)
SMTP for Email Verification
| Setting | Value |
|---|---|
| Provider | Resend |
| Domain | ricoya.net |
| DNS | DKIM TXT + SPF MX + SPF TXT on GoDaddy |
| Status | Working and tested |