# Best practice for layering Attack Protection against credential stuffing on a public login page?

**URL:** <https://community.auth0.com/t/best-practice-for-layering-attack-protection-against-credential-stuffing-on-a-public-login-page/205566>\
**Category:** Get Help\
**Tags:** authentication\
**Created:** [November 19, 2026, 9:52am UTC](https://community.auth0.com/t/best-practice-for-layering-attack-protection-against-credential-stuffing-on-a-public-login-page/205566 "2026-11-19T09:52:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [November 19, 2026, 7:40pm UTC](https://community.auth0.com/t/best-practice-for-layering-attack-protection-against-credential-stuffing-on-a-public-login-page/205566/3 "2026-11-19T19:40:43Z")

</div>

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](https://auth0.com/blog/auth0-bot-detection-reduces-bot-attacks-by-79/#:~:text=and%20growth%20objectives.-,Fewer%20Than%201%25%20of%20Challenges%20Shown,-As%20bot%2Dbased).

- **Shared IP Management:** Avoid blanket IP blocking by leveraging [the **IP Allowlist**](https://auth0.com/docs/api/management/v2/attack-protection/patch-suspicious-ip-throttling) 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](https://auth0.com/docs/secure/attack-protection/use-akamai-supplemental-signals-actions)) 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](https://auth0.com/docs/secure/attack-protection/bot-detection#:~:text=Always%3A-,Always,-require%20your%20users)” 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](https://auth0.com/docs/secure/attack-protection/bot-detection#:~:text=If%20you%20choose-,When%20Risky,-%2C%20the%20Bot%20Detection)” 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:**

#### 2. Tuning Thresholds for Shared IPs (Offices, NATs, Mobile Carriers)

[Suspicious IP Throttling](https://auth0.com/docs/secure/attack-protection/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

1. **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.

2. **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](https://support.auth0.com/center/s/article/using-the-auth0-forwarded-for-header-with-auth0-private-key-jwt-authentication). Without this, all traffic appears to originate from the proxy’s IP pool, quickly triggering tenant-wide throttling.

3. **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:

4. **Deploy in Monitoring Mode First:**  
Before enabling active blocking shields (`shields: ["block"]`), configure tenant log streaming to observe [`limit_wc`](https://auth0.com/docs/secure/attack-protection/playbooks/bot-detection-playbook#:~:text=credential%20stuffing%20attacks.-,limit_wc,-IP%20block%20events) (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.

#### [Key High-Fidelity Risk Signals](https://support.auth0.com/center/s/article/Save-Adaptive-MFA-Risk-Scores-to-App-Metadata-Using-an-Action)

- **`event.authentication.riskAssessment` (Adaptive MFA):**

- **Perimeter/Edge Supplemental Signals:**

- **Geo-Velocity and Autonomous System Numbers (ASN):**

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

---

_[View the full topic](https://community.auth0.com/t/best-practice-for-layering-attack-protection-against-credential-stuffing-on-a-public-login-page/205566)._
