Credential Verification Setup¶
This guide walks through configuring Turnstile (human verification) and Twilio Verify (phone verification) for Last1 ID.
1. Cloudflare Turnstile (human_verified)¶
Create a Turnstile widget¶
- Go to Cloudflare Dashboard → select your account
- Navigate to Turnstile (or visit https://dash.cloudflare.com/?to=/:account/turnstile)
- Click Add site
- Configure:
- Site name:
Last1 ID(or your choice) - Domain:
last1.id(addlocalhostfor local dev) - Widget mode: Managed (recommended) or Non-interactive
- Click Create
- Copy the Site Key (public) and Secret Key (private)
Add keys to your environment¶
Add to your .env file (project root):
# Cloudflare Turnstile
TURNSTILE_SECRET_KEY=your_secret_key_here
VITE_TURNSTILE_SITE_KEY=your_site_key_here
TURNSTILE_SECRET_KEY— server-only, used to verify tokensVITE_TURNSTILE_SITE_KEY— exposed to the client (Vite prefix), used by the widget
Restart the dev server after adding env vars.
2. Twilio Verify (phone_verified)¶
Create a Verify service¶
- Go to Twilio Console
- Navigate to Verify → Services (or https://console.twilio.com/us1/develop/verify/services)
- Click Create new
- Set Friendly name:
Last1 ID - Click Create
- Copy the Service SID (starts with
VA...)
Add keys to your environment¶
You need your Twilio Account SID and Auth Token from the Twilio Console dashboard.
Add to your .env file:
# Twilio Verify
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=your_auth_token_here
TWILIO_VERIFY_SERVICE_SID=VAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Restart the dev server after adding env vars.
3. Vite env vars (client)¶
Vite exposes env vars prefixed with VITE_ to the client. Add them to your .env file at the project root:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_TURNSTILE_SITE_KEY=your_turnstile_site_key
These are loaded when you run npm run dev or npm run build. No extra config needed.
Verification¶
- Turnstile: If keys are missing, the credentials page shows "Turnstile is not configured"
- Twilio: If keys are missing, the phone verify button returns "Phone verification not configured"
- Email resend: Uses Supabase Auth; no extra config beyond Supabase