DocHub
SMS verification via Twilio Verify service, configured in Supabase

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

  1. User enters phone number on login page (country codes: Honduras +504, US +1)
  2. Supabase calls Twilio Verify to send SMS OTP
  3. User enters 6-digit code
  4. 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:

  1. Login page checks if user has full_name, name, or email in auth metadata
  2. If not, fetches DB profile to check for saved username
  3. If no username exists, redirects to /profile instead of /restaurants
  4. 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