Commit 61d1c9e
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 identity1 parent e63b839 commit 61d1c9e
10 files changed
Lines changed: 895 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments