Account Abuse Protection Demo API

This Worker demonstrates Cloudflare's fraud prevention capabilities.

POST /api/signup

Create account with email/password. Detects disposable emails and email risk.

{ "email": "test@example.com", "password": "pass123" }

POST /api/login

Login with credentials. Detects leaked credentials and ATO patterns.

{ "email": "alice@demo-shop.test", "password": "secure123" }

POST /api/checkout

Process payment. Rate limited by User ID to prevent card testing.

{ "email": "test@example.com", "card_number": "4242424242424242", "amount": 99.99 }

GET /api/whoami

View all fraud and security signals visible to this Worker.

Use with: node scripts/demo.mjs [scenario]

Scenarios: disposable, risk, leaked, stuffing, userid, cards, all