Skip to content

Commit 61d1c9e

Browse files
committed
feat: add Twilio OTP verification and JWT authentication
- Add phone number verification via Twilio Verify with SMS OTP - Issue JWT tokens after successful verification (30-day expiry) - Protect all API endpoints with auth middleware - Rate limit OTP requests to 3 per phone per 24 hours - Cache verified phones to skip OTP on repeat registrations - Enforce phone number ownership on device registration - Use authenticated phone as authoritative sender identity
1 parent e63b839 commit 61d1c9e

10 files changed

Lines changed: 895 additions & 25 deletions

File tree

server/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
DATABASE_URL=postgresql://postgres:postgres@localhost:5433/fliq
33
PORT=3100
44
NODE_ENV=development
5+
6+
# Twilio Verify (OTP)
7+
TWILIO_ACCOUNT_SID=your_twilio_account_sid
8+
TWILIO_AUTH_TOKEN=your_twilio_auth_token
9+
TWILIO_VERIFY_SERVICE_SID=your_verify_service_sid
10+
11+
# JWT
12+
JWT_SECRET=a_strong_random_secret_at_least_32_chars

0 commit comments

Comments
 (0)