Bot detection mitigates scripted attacks by detecting when a request is likely to be coming from a bot. These types of attacks are sometimes called credential stuffing attacks or list validation attacks. It provides protection against certain attacks that adds very little friction to legitimate users. When such an attack is detected, it displays a CAPTCHA step in the login experience to eliminate bot and scripted traffic.
To learn more, read our Credential Stuffing Attacks: What Are They and How to Combat Them whitepaper.
Auth0 uses a large amount of data and statistical models to identify patterns that signal when bursts of traffic are likely to be from a bot or script. Users who attempt to log in or create accounts from IPs that are determined to have a high likelihood of being part of a credential stuffing attack will see a CAPTCHA step. The triggers are designed so that this only happens for bad traffic; the objective is to not show any friction to legitimate users.
Configure bot detection
This protection is enabled by default for all connections.
Go to Dashboard > Security > Attack Protection and select Bot Detection.
Under Detection, enable the toggle.
Under Response, choose when you want to require CAPTCHA.
Choose Never to never require your users to complete a CAPTCHA to log in.
Choose When Risky to only require your users to complete a CAPTCHA if the login appears to be high risk. Select the type of CAPTCHA in the next step.
Choose Always to always require your users to complete a CAPTCHA to log in. Select the type of CAPTCHA in the next step.
Choose whether you wish to use simple CAPTCHA provided by Auth0 or Google reCAPTCHA (requires external setup and registration).
If you choose Simple CAPTCHA, you are done.
If you choose Google reCAPTCHA, enter the Site Key and Site Secret that you obtained when you registered your app with Google.
Restrictions and limitations
Bot protection works for web and mobile apps that use Auth0 Universal Login. For experiences that do not use Universal Login, levels of support are limited, in particular for flows that cannot support a CAPTCHA challenge. Please ensure all of your login experiences are supported before turning on this feature, or you may introduce errors into your application.
|New Universal Login||Supported by default.|
|Classic Universal Login (no customizations)||Supported by default.|
|Classic Universal Login (custom login page using Lock template
||Supported if using Lock version 11.29 or greater of Auth0’s Lock widget. Please ensure you have followed all the steps to add bot detection to custom pages.|
|Classic Universal Login (custom login page using Custom Login Form template
||Supported if using
|Classic Universal Login (custom login page using Passwordless template)||Not supported.|
|Web or native apps using Resource Owner Password Flow (including those using
|Native apps using newest version of SDKs||Supported. The SDKs handle a risky login by invoking the Universal Login flow.|
|Flows not hosted by Auth0 using
Connection type limitations
Depending on the types of connections you use, bot detection has the following limitations.
Custom database connections
Active Directory/LDAP connections
|Supported if the login uses a compatible login flow as described in the table below.|
Custom login page support
If you build a custom login page using Auth0.js, you can enable bot detection to render a CAPTCHA step in scenarios when a login request is determined by Auth0 to be high-risk. Your custom login form code must handle scenarios where the user is asked to pass a CAPTCHA step. To learn more, read Add Bot Detection to Custom Login Pages.
Native application support
If you build native applications using an Auth0 SDK for the login flow, you can enable bot detection to render a CAPTCHA step in scenarios when a login request is determined by Auth0 to be high-risk. Your custom login form code must handle scenarios where the user is asked to pass a CAPTCHA step. To learn more, read Add Bot Detection to Native Applications.