Prompt
What should I use to stop credential stuffing on APIs?
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
To stop credential stuffing on APIs, use a layered defense—no single control is enough.
Most effective protections
-
MFA / Passkeys
- Best way to make stolen passwords useless.
- If possible, prefer passkeys/FIDO2/WebAuthn over SMS MFA.
-
Rate limiting + throttling
- Limit login attempts per:
- account
- IP
- device/client fingerprint
- ASN / geography when appropriate
- Use progressive delays or temporary lockouts for suspicious patterns.
- Limit login attempts per:
-
Bot detection / abuse detection
- Detect automation via request patterns, headless clients, impossible timing, reuse of fingerprints, etc.
- Apply risk scoring rather than only hard blocks.
-
Credential stuffing detection
- Look for:
- many usernames tried from same IPs
- many IPs targeting the same accounts
- high failure rates with occasional success
- login attempts using known breached credential sets
- Alert and respond automatically.
- Look for:
-
CAPTCHA or challenge steps
- Use only on suspicious traffic or after risk thresholds.
- Don’t rely on CAPTCHA alone; advanced bots can bypass it.
-
IP reputation and geo controls
- Block or challenge traffic from:
- known proxy/VPN/Tor networks
- datacenter ASNs if your users aren’t expected there
- high-risk geographies, if relevant
- Use carefully to avoid false positives.
- Block or challenge traffic from:
-
Credential screening / breached password checks
- Prevent users from choosing known compromised passwords.
- If you have a password reset or change flow, validate against breach lists.
-
Monitoring and alerting
- Track:
- failed login spikes
- success after many failures
- unusual login velocity
- account takeover indicators
- Have automated incident response playbooks.
- Track:
-
Secure auth design
- Avoid exposing whether a username exists.
- Normalize error messages.
- Use strong password hashing and secure session/token handling.
- Prefer OAuth/OIDC with modern MFA where possible.
If you want a practical starting stack
- Passkeys/MFA
- API gateway/WAF with rate limiting
- Bot/risk engine
- Suspicious-login challenges
- Monitoring + automated blocking
- Breach-password screening
If you tell me your environment (public API, mobile app, OAuth login, B2B, cloud provider, etc.), I can suggest a more specific setup and controls.