Stop credential stuffing on login
Credential stuffing replays usernames and passwords leaked from other sites. The scripts that do it rotate IP addresses, so blocking by IP alone rarely holds. The device and how the form was filled are much harder to hide. This recipe uses the login decision to catch the logins that get through with a valid password.
1. Add the login decision
Section titled “1. Add the login decision”Tag the login form and call the decision API after the password checks out, as in Detect AI agents on your login page. Always send request_id: without the tag there is no device, and the strongest stuffing signals come from the device.
2. The signals that matter
Section titled “2. The signals that matter”| Reason code | What it means |
|---|---|
BOT_INJECTED_CREDENTIALS |
The credentials were set directly on the fields, without typing or a password manager. |
BOT_CREDENTIAL_TIMING |
The username and password arrived the way scripts and stuffing tools enter them. |
BOT_AUTOMATION, BOT_HEADLESS, BOT_WEBDRIVER |
The browser is driven by automation tools. |
VEL_DEVICE_ACCOUNTS |
One device has signed in to many of your accounts. |
ACCT_NEW_DEVICE |
The account is on a device it has never used. |
NET_HOSTING_IP |
The request came from a hosting provider rather than a home or mobile network. |
DEV_NOT_COLLECTED |
The tag did not run, which scripts that skip your pages often cause. |
The this_customer block shows the device’s account counts over 24 hours and 7, 30, and 90 days, so you can see a device fanning out across accounts as it happens. Look up any code with GET https://api.opencontext.com/v1/reason-codes (no key needed).
3. Let the rules decide
Section titled “3. Let the rules decide”The starter login rules include a check named “Script entering credentials?” that denies hidden automation entering credentials this way, and they step up other risky logins, so a stuffing run meets a verification step it cannot pass, while your real customers rarely see one. To tighten it, add a rule in the login ruleset, for example: when VEL_DEVICE_ACCOUNTS is present and the account is on a new device, deny. Test it on your past traffic with replay before you publish. See Rules.
4. Act on step up with something a script cannot pass
Section titled “4. Act on step up with something a script cannot pass”A one-time code to the account’s email or phone, or a passkey, stops a replayed password. Report step_up_passed when a person passes, so their device builds trust and they are not asked again.
5. Report confirmed takeovers
Section titled “5. Report confirmed takeovers”When an account turns out to have been taken over, report an outcome with outcome_type set to account_takeover against the login’s decision_id. The device is then marked across your accounts, and its next attempt on any account is caught sooner. For 30 days, any other device that is new to the taken-over account, such as another browser on the attacker’s computer, is asked to step up. See Outcomes.