Skip to content

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

  1. Go to Cloudflare Dashboard → select your account
  2. Navigate to Turnstile (or visit https://dash.cloudflare.com/?to=/:account/turnstile)
  3. Click Add site
  4. Configure:
  5. Site name: Last1 ID (or your choice)
  6. Domain: last1.id (add localhost for local dev)
  7. Widget mode: Managed (recommended) or Non-interactive
  8. Click Create
  9. 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 tokens
  • VITE_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

  1. Go to Twilio Console
  2. Navigate to Verify → Services (or https://console.twilio.com/us1/develop/verify/services)
  3. Click Create new
  4. Set Friendly name: Last1 ID
  5. Click Create
  6. 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