Auth0’s Attack Protection feature is more than just a firewall; it’s a sophisticated system designed to detect and block malicious login attempts by analyzing user behavior and network patterns.

Let’s see it in action. Imagine an attacker trying to brute-force credentials against your Auth0 application. They might be using a list of common usernames and passwords, or even trying to guess them.

Here’s a typical flow:

  1. User Tries to Log In: A user enters their username and password.
  2. Auth0 Receives the Request: Auth0 processes this login attempt.
  3. Attack Protection Scans: Before authenticating, the request is passed through Auth0’s Attack Protection rules. This involves checking against several criteria.
  4. Suspicious Activity Detected: If the activity matches known malicious patterns (e.g., too many failed logins from the same IP, impossible travel scenarios, known malicious IPs), Auth0 flags it.
  5. Action Taken: Based on your configuration, Auth0 can block the login attempt, require additional verification (like MFA), or simply log the event for later review.

The core problem Attack Protection solves is the ever-present threat of credential stuffing, brute-force attacks, and other automated malicious activities that aim to compromise user accounts. It shifts the burden of detecting and mitigating these attacks from your application servers to Auth0’s dedicated security infrastructure.

Internally, Attack Protection leverages several key components:

  • IP Threat Intelligence: Auth0 maintains a dynamic list of IP addresses known to be associated with malicious activity, such as botnets, proxies, and Tor exit nodes.
  • Behavioral Analysis: It tracks patterns of user behavior, like the number of failed login attempts within a specific timeframe from a particular IP address or user account.
  • Impossible Travel Detection: If a user logs in from two geographically distant locations within an impossibly short period, it’s flagged as suspicious.
  • MFA Fatigue Attacks: Auth0 can detect and mitigate attempts to overwhelm users with MFA push notifications.

To enable and configure Attack Protection, you navigate to Security > Attack Protection in your Auth0 dashboard.

Here, you’ll find several sections:

  • Breached Passwords: This feature checks user passwords against a database of known compromised credentials. If a user tries to log in with a password that has been leaked in a data breach, Auth0 can block the login or prompt for a password change.
  • MFA Blocking: You can configure rules to block logins from specific countries or IP ranges if they are deemed high-risk, or to enforce MFA for all users.
  • Brute Force Protection: This is where you set thresholds for failed login attempts. For example, you can specify that after 5 failed login attempts from the same IP address within 10 minutes, the IP will be blocked for 1 hour.
  • Suspicious IP Throttling: This allows you to set a maximum number of requests from a single IP address per second, helping to prevent denial-of-service (DoS) attacks.

Let’s dive into a specific configuration example for Brute Force Protection. You might set:

  • Max Failed Attempts: 5
  • Period in Seconds: 600 (10 minutes)
  • Block Period in Seconds: 3600 (1 hour)

With this configuration, if a user account or IP address exceeds 5 failed login attempts within a 10-minute window, that IP address will be blocked from making further login attempts for 1 hour. This mechanically prevents automated scripts from rapidly guessing passwords without giving the legitimate user a chance to retry after a brief cool-down.

The system doesn’t just block; it learns. Over time, Auth0’s attack protection mechanisms improve by analyzing the global threat landscape and adapting their detection algorithms. This means that even with static configurations, the underlying protection gets smarter.

When you configure the "Breached Passwords" feature, Auth0 doesn’t store your users’ passwords. Instead, it performs a secure, one-way comparison against a hashed version of known compromised passwords, ensuring user privacy while still providing robust protection against credential stuffing.

The next step after enabling robust attack protection is to consider how you handle the legitimate user experience during potential false positives or during recovery from an attack.

Want structured learning?

Take the full Auth0 course →