Hi all,
I’m reviewing the login flow for a web app using Universal Login and
want to harden it against credential stuffing and bot traffic.
What we have enabled so far:
- Brute-force protection
- Breached password detection
- Suspicious IP throttling
What I’m unsure about:
- Is Bot Detection (CAPTCHA) worth enabling for all logins, or only
after a risk threshold is hit?
- How are others tuning thresholds to avoid locking out legitimate
users on shared IPs (offices, mobile carriers)?
- Are you using Actions to add custom risk checks on top of the
built-in protections? If so, what signals have worked well?
Would love to hear what has worked in production. Thanks!
The Cyber Seal
Hi @cyberseal
Welcome to the Auth0 Community!
I understand that you are inquiring about best practices for Attack Protection features agains credential stuffing on a public login page, focusing on the three main layers you proposed.
Official Recommendation
We will briefly go over each point and then dive deeper into the implementation recommendations.
-
Bot Detection: Configure Bot Detection to “When Risky” rather than “Always.” Auth0’s behavioral and statistical models screen out automated attacks with minimal impact, challenging fewer than 1% of legitimate human logins.
-
Shared IP Management: Avoid blanket IP blocking by leveraging the IP Allowlist for corporate CIDRs, ensuring proper auth0-forwarded-for header propagation through upstream CDNs/proxies, and tuning the max_attempts and replenish rate in the Management API.
-
Custom Risk Checks with Actions: Augment built-in protection in Post-Login Actions using event.authentication.riskAssessment (evaluating NewDevice, ImpossibleTravel, and UntrustedIP) or edge telemetry (such as Akamai Supplemental Signals) to enforce step-up MFA or deny access dynamically.
1. Bot Detection (CAPTCHA): “When Risky” vs. “Always”
In production, “When Risky” is the industry standard for standard web authentication .
-
Why “Always” is generally avoided on standard logins: Requiring CAPTCHA on every login attempt degrades the user experience and directly impacts conversion and retention rates;
-
How “When Risky” functions: Auth0 analyzes statistical traffic patterns, request velocity, and IP reputation. Only requests flagged with a high probability of scripted or credential stuffing behavior receive a challenge.
-
Verification Methods: Auth0 defaults to Auth Challenge, an automated, frictionless browser-based challenge that does not require solving interactive image puzzles. If fallback or visual CAPTCHA is preferred, integrations with Google reCAPTCHA, Cloudflare Turnstile, hCaptcha, or Arkose Labs are supported.
-
Tuning Detection Levels:
-
Low: Best for consumer platforms prioritizing frictionless login; only challenges requests with very high bot probability .
-
Medium (Default): The recommended balance between security and user friction for most enterprise and SaaS applications .
-
High: Strictest risk sensitivity. Best used during active credential stuffing attacks or applied specifically to unauthenticated, high-target flows such as public sign-up forms.
2. Tuning Thresholds for Shared IPs (Offices, NATs, Mobile Carriers)
Suspicious IP Throttling responds with HTTP 429 Too Many Requests when a single IP triggers rapid failed login attempts across multiple accounts or high-velocity signup spikes. Because thousands of legitimate users may share a single public IP behind corporate NATs or mobile gateways (CGNAT), standard thresholds can occasionally lead to collateral lockouts.
Production Mitigation Strategies
-
Maintain an IP Allowlist for Known CIDR Ranges:
Add headquarters egress IPs, corporate VPN endpoints, and trusted partner networks to the IP AllowList under Dashboard > Security > Attack Protection > Suspicious IP Throttling. Auth0 supports up to 100 discrete IP addresses or IPv4/IPv6 CIDR blocks, exempting them from throttling.
-
Verify Reverse Proxy and Header Forwarding:
If your application routes traffic through a CDN (Cloudflare, AWS CloudFront, Akamai) or an ingress load balancer before reaching Auth0, verify that the true client IP is forwarded via the auth0-forwarded-for header. Without this, all traffic appears to originate from the proxy’s IP pool, quickly triggering tenant-wide throttling.
-
Fine-Tune Throttling via the Management API:
Default settings can be adjusted via the Management API endpoint (PATCH /api/v2/attack-protection/suspicious-ip-throttling) or Terraform:
-
stage.pre-login.max_attempts: The burst allowance of failed attempts allowed from an IP before throttling kicks in.
-
stage.pre-login.rate: The interval (in milliseconds) at which new login tokens are replenished (e.g., lower rate value grants new attempts faster).
-
Deploy in Monitoring Mode First:
Before enabling active blocking shields (shields: ["block"]), configure tenant log streaming to observe limit_wc (IP block for failed attempts to single account) and limit_sul / limit_mu (velocity blocks) events to baseline legitimate traffic vs. abuse patterns.
3. Layering Custom Risk Checks with Auth0 Actions
While built-in Attack Protection blocks automated velocity at the perimeter before credentials are fully processed, Post-Login Actions allow application-aware security orchestration right after the user submits valid credentials.
-
event.authentication.riskAssessment (Adaptive MFA):
assessments.NewDevice.confidence: Evaluates browser fingerprint and cookies against device history from the last 30 days (low, medium, high);
assessments.ImpossibleTravel.confidence: Flags logins where geographical distance between the current and previous login exceeds realistic travel velocity;
assessments.UntrustedIP.confidence: Analyzes IP reputation and historical threat intelligence.
-
Perimeter/Edge Supplemental Signals:
- For setups fronted by edge security (e.g., Akamai),
event.authentication.riskAssessment.supplemental.akamai provides raw edge telemetry such as botScore, botCategory, and akamaiUserRisk .
-
Geo-Velocity and Autonomous System Numbers (ASN):
- Evaluate
event.request.geoip against known hosting providers, data centers, or Tor exit nodes using community datasets or external threat intelligence APIs.
We hope the above information helped make the best decision for your current architecture when it comes to maintaining a safe environment, while balancing overall user experience.
Have a great one!
Gerald