Most web apps still answer login with a single question: does the password match? Risk based authentication replaces that yes-or-no with a decision built from context — the device, the network, and the behavior around the attempt. The same credentials can be allowed on the laptop a customer uses every morning, asked for one extra step when they arrive from a new device on a datacenter network, and stopped when the pattern looks like an automated attack rather than a person.
The difficult part is not collecting signals. It is deciding what each combination means, choosing a step-up that is proportionate, and enforcing the policy without turning away real customers. This guide walks through building that policy for a web app, one decision at a time, with the tradeoffs spelled out.
Answer three questions at every login
Risk based authentication is easier to design when you split it into three separate questions. Each produces evidence; the policy combines them.
Is this a device we have seen before?
Device trust should come from characteristics of the device itself, not from a cookie the user can clear. A fingerprint built from browser and hardware attributes gives you a stable comparison point across sessions, and it survives incognito windows and cookie resets. Our guide to device fingerprinting covers which attributes are worth keeping and where they break down.
Keep three states instead of a boolean: trusted, new, and risky. A device that has completed logins before is trusted. A device seen for the first time is new — not guilty. A device that spoofs its own attributes or is reused across many unrelated accounts is risky. Those three states map cleanly to allow, step-up, and block.
Is the network plausible for this account?
Network signals are the easiest to over-read. VPN, proxy, Tor and datacenter traffic tell you how the connection is routed, not who is behind it. Plenty of legitimate customers use a VPN every day, so a blanket VPN block costs you real sign-ins and teaches attackers to try harder.
Use the network to raise the assurance required, not to convict. A login from a new device on a datacenter IP is a reasonable step-up. The same login from a trusted device on a residential connection the account already used is not. Track the network and the rough geography, and treat impossible travel — two logins from distant places in a short window — as a reason to challenge.
Does the behavior fit the account?
Behavior lives in logs you already write: attempts per device, distinct accounts per device, time between signup and first login, one-time-code requests per number, and retry velocity after a failed password. The work is scoring them, not collecting them.
Behavior should adjust the score, never decide alone. One failed password is normal. Three failures followed by a success from a device that has touched forty accounts is a pattern.
Turn the signals into a policy
Write the policy as a table before you write code. An explicit mapping keeps arguments short and makes review possible.

| Condition | Decision | Suggested step |
|---|---|---|
| Trusted device, consistent network, normal velocity | Allow | none |
| New device on a datacenter or proxy network | Step-up | verify_email or card_or_passkey |
| Risky device or many accounts per device | Step-up | captcha |
| Known bad pattern, tampering, active attack | Block | none |
The decision shape stays the same across use cases: allow, step-up, or block, with a reason code and a suggested step. Reason codes matter later, when you want to know why a cohort of users got challenged. Our docs describe how that decision is returned and what each field means.
One design rule saves a lot of pain: your application owns enforcement. The risk engine returns a decision and its reasons; your login handler decides what the user sees. That keeps the policy auditable and lets you change thresholds without redeploying a black box.
Run in mirror mode before you enforce
New policies are almost always wrong in some edge case. Run the engine for a short period and log every decision without acting on it: who would have been stepped up, who would have been blocked, and which reason fired. Compare that list against support tickets and your own test accounts. Only then turn enforcement on, one use case at a time — login first, then signup, trial and checkout separately.
Measure the policy, not just the blocks
Three numbers tell you whether the policy is working: how many legitimate users hit a step-up they did not need, how many of them complete it, and how many account takeover reports reach support per thousand logins. A policy that blocks a lot and challenges nobody is usually a policy that is guessing.

Review the reasons behind blocks weekly. If one reason code drives most enforcement, the threshold is probably too aggressive, and the fix is a policy change rather than another signal.
FAQ
What is the difference between risk based authentication and MFA?
MFA asks for a second factor every time or on a fixed schedule. Risk based authentication decides when that factor is actually needed, based on device, network and behavior. They work together: the risk decision chooses when to trigger the second factor.
Should a VPN trigger a block?
Rarely. VPN use is common among privacy-conscious and remote users. Treat it as one signal that raises the assurance required, and reserve blocks for combinations with stronger evidence, such as a new device plus automation signals.
Does risk based authentication need machine learning?
No. A clear rules table with three or four signals covers most web app logins and stays explainable to support teams and auditors. Add scoring when you have enough labeled outcomes to validate it.
Make login a decision instead of a guess
Prynt Control answers login decisions with allow, step-up, or block, plus a reason code and a suggested step — and it never blocks on its own, your code stays in charge. Start in mirror mode, review the decisions, then enforce with a policy you can explain. See how the suite fits your stack at pryntid.com.

Try it free
Prynt is device intelligence with a free plan: 5,000 identifications a month, visitor IDs with confidence and bot detection — no credit card. Upgrade to Pro for VPN, proxy, tampering and behavioral signals.