Configure protection
Read and change settings withGET and PATCH on protection/ in your application’s Authentication management API, or from the console.

Authentication > Bot protection.
enabled and breached_password_check are false by default.
The modes above are the defaults for an application whose protection settings are created from now on.
Settings you already saved keep their modes.
stuffing defaults to Challenge because offices, campuses and mobile carriers put many real people behind one address.
They get an extra proof instead of a lockout, and someone trying a correct breached password still cannot finish.
GET protection/ also returns available for each policy.
vpn and travel are available when Didit’s IP analysis can be reached for your application.
While a policy is not available, its mode has no effect and the console marks it as not available yet.
Policies
The
vpn and travel policies use Didit’s IP analysis. If that lookup is unavailable, the attempt continues; a sign-in never fails because of it. The location for travel updates only after a completed sign-in.
In a Sandbox application the lookup answers only for addresses Didit has already resolved.
For a new address, vpn and travel can stay silent in Sandbox while they match in a Live application.
What a blocked attempt returns
A blocked attempt never tells the caller whether an account exists or whether the password or code was right.bots,stuffing,disposableandvpnare decided before the password or code is checked. The call answers403 {"error": "attempt_blocked"}, the same for an existing account, an unknown one, a right secret and a wrong one.bruteandtraveldepend on the account. Their block is enforced and recorded as anattempt_blockedevent, but a password or code attempt answers exactly like a wrong secret:400 {"error": "invalid_credentials"}for a password and400 {"error": "invalid_grant"}for a code. The hosted page shows its usual message to check the details. Passkey, social and organization SSO sign-ins, which prove the person first, answer403 {"error": "attempt_blocked"}.
Brute force and lockout
Thebrute mode decides what happens after 5 failures:
- Block: the person must reset their password before they can sign in again. Until then, every password attempt answers like a wrong password.
- Challenge: for 15 minutes, a sign-in with the right password also needs an extra proof (see challenges).
- Off or Log: no lock.
Bot score and device signals
Didit’s server decides the bot score from the request itself. The score runs from 0 to 1 and is the strongest signal found, andbots matches at 0.8 or more.
Each detection in the console lists the signals that matched.
Hosted pages. The hosted pages collect these browser signals with a script served from your sign-in origin and send them with every form.
They need JavaScript: a hosted form posted without its signals counts as
no-signals.
Your own screens. Send device signals on your sign-in calls with these headers.
The Didit SDKs send them for you.
- A sign-in call from a browser page on one of your allowed origins is accepted without
X-Didit-PIDandX-Didit-FP-Hash.@didit-protocol/authsends them by default since version 0.2.0, so your sign-in events carry the device. Version 0.2.0 also sends its own bot score inX-Didit-FP-Bot-Score. From version 0.3.0 the package sendsX-Didit-Signalsinstead, when the evidence is available, and never a score. It collects the evidence after the page loads: a request made as the page loads, such as reading the session, does not wait for it, and a sign-in step waits for it for at most 2 seconds. A request from 0.3.0 without the header is not a broken integration. Version 0.1.0 sent them only when your page and your sign-in origin shared an origin: update, or setdeviceSignals: "always"there. - Your allowed origins may send all four headers: the sign-in API lists them in its cross-origin (CORS) answer, so the browser lets the call through.
- A client that sends no
Originheader, such as a native app or a script, must sendX-Didit-PIDorX-Didit-FP-Hash. Without them the call counts asno-signals. The Didit native SDKs send both. Versions 4.15.0 to 4.15.6 also reportX-Didit-FP-Bot-Scorefrom their device integrity checks, and do not sendX-Didit-Signals: an app on them can matchclient-score, and nothooking,emulator,debuggerorrooted, which Didit reads from the evidence a native SDK sends inX-Didit-Signals. - A passkey sign-in proves a present person with user verification, so missing signals never count against it.
script-ua and stuffing and share one rate limit.
POST token/, GET session/, DELETE session/, POST step-up/ and POST monitoring-token/ never run the bot policy, so your backend and the Didit server SDKs are not affected.
These signals are context for a decision, not proof that a person is present.
They stop the tools that do not hide: scripts, default headless browsers and browser drivers.
A browser that is configured to hide its automation and to send every expected signal is not caught by bots alone, so keep stuffing, brute, vpn, the rate limits and attack mode for a determined attacker.
What Didit decided from these signals is on the detection: the console shows which policy matched and the signals behind it, and the decision is stored as an auth.* event such as attempt_blocked or attempt_challenged on the timeline.
A sign-in event’s own event.device.bot_score is a different number, on a different scale.
It is the score a client reported about itself in X-Didit-FP-Bot-Score, converted from the header’s 0 to 1 scale to 0 to 100: a header of 0.8 is 80 on the event, so an event rule compares the field with 80, not 0.8.
It is not the score Didit decided, and it is present only when the client sent one.
A client that sends evidence instead of a score, as @didit-protocol/auth does from version 0.3.0, sends none, so the field is absent on its sign-in events.
A threshold rule such as event.device.bot_score gte 80 does not match them, and a missing-value rule such as event.device.bot_score is_null does.
Your own browser tests are automation too.
Run them against a Sandbox application whose bots policy is Off or Log.
AUTOMATION_FRAMEWORK_DETECTED is a different check. It is an IP and device analysis warning on verification sessions, raised when the verification SDK reports a browser automation framework. It does not run at sign-in. At sign-in, automation is caught by the bots policy above.Challenges
A challenged attempt returns this instead of a sign-in code:POST protection/complete/:
{"challenge", "method": "email_code", "code"}with the 6-digit code sent to the person’s email, or{"challenge", "method": "passkey", "response"}with the WebAuthn response.
403 {"error": "protection_factor_unavailable"}.
Breached passwords
Withbreached_password_check: true, Didit checks new and reset passwords against known breached passwords. The password itself is never sent anywhere. A breached password is rejected with password_breached. At sign-in, a breached password counts as a stuffing match. If the check is unavailable, the password is accepted.
Attack mode
Turn on attack mode during an active attack:POST protection/attack-mode/with{"duration_hours": 1}(or6or24) returns201.DELETE protection/attack-mode/ends it early. It also ends on its own after the duration.
- People sign in with a passkey. Passkey sign-in works as usual.
- Password, email code, magic link and phone code attempts are refused before the password or code is checked, with
403 {"error": "protection_factor_unavailable"}. The answer is the same for every address, right or wrong, and no email or text message is sent. The hosted page tells the person that sign-in is temporarily limited to passkeys. - Social and organization SSO sign-ins must pass a passkey challenge after the provider. A person without a passkey gets
403 {"error": "protection_factor_unavailable"}. - New sign-ups and people without a passkey cannot finish until attack mode ends.
- A sign-up from a VPN, Tor or data-center network is blocked with
403 {"error": "attempt_blocked"}, when thevpnpolicy is available.
attempt_blocked event that names attack mode.
Allowlist and blocklist
On the Growth plan and above, and in every Sandbox application, your application’s Blocklist and Allowlist in the console’s Lists apply to every sign-up, sign-in, password reset and token renewal, whether or not protection is on. They are the same lists identity verification uses, so a value you block there is blocked at sign-in too. On the Free plan, a Live application’s lists apply to identity verification only.- A user is the person’s
vendor_data, and a device is the device identifier the Didit web and native SDKs send. - Before the password or code is checked, a match on what the person typed, their IP address or their device answers
attempt_blocked. When only the account’s own values match (its user, or the email address or phone number the person did not type), a password or code attempt answers exactly like a wrong secret instead, as forbruteandtravel, so the answer never tells whether the account exists. A passkey or social sign-in for that account answersattempt_blockedonce the person is identified. - A person who is already signed in and then added to the blocklist is signed out at their next token renewal, within five minutes.
The renewal answers
400 {"error": "invalid_grant"}, the same answer as for any session that has ended. - A value on both lists is blocked.
- A change to a list applies within 30 seconds.
- Custom lists, such as High Risk Countries, are workflow conditions and do not apply at sign-in.
- If the lists cannot be checked, the attempt continues: a sign-in never fails because of this check.
Rate limits
Every runtime route is limited per IP, per application:
Over the limit, the call returns
429. Respect a Retry-After header when one is sent. Sign-in attempts are also limited per minute: 60 per IP, 15 per account, 30 per device, 3,000 per application, and 20 SMS or WhatsApp code requests per phone-number prefix. Token refreshes have an application bucket of their own, 6,000 a minute, so refreshes never use up your sign-ins.
Events
Each decision is recorded as an authentication event:risk_logged, attempt_challenged, attempt_blocked, challenge_passed, challenge_failed, attack_mode_started and attack_mode_ended. The event shows which policy matched, or blocklist for an attempt refused by your blocklist.
Test it
In a sandbox application, test each mode you enable: a blocked attempt, a passed and a failed challenge, a lockout and its reset, and attack mode on and off. Keep errors generic in your UI so they do not reveal whether an account exists. Testvpn and travel in a Live application, because a Sandbox lookup answers only for addresses Didit has already resolved.