Engineering
How to add network authentication to existing apps
By the AMT team ·
You don’t need to rebuild your login system to benefit from network signals. The fastest path is to add network-verified authorization in front of the few actions that matter most.
Step 1: Pick your riskiest actions
Start small. Typical first candidates:
- Changing a bank account or direct deposit
- Approving a payment, wire or offer
- Signing in as an administrator
- Exporting sensitive data
Step 2: Write a policy for each app
A policy says what “normal” looks like. For a payroll app, that might be:
{
"appName": "payroll",
"allowRoaming": false,
"allowedCountries": ["US"],
"simSwappedCoolDownInHours": 72,
"deviceSwappedCoolDownInHours": 24
}
Keeping policy as data, outside your application code, means security teams can tune it without a deploy.
Step 3: Call the authorization API before the action
Right before your code commits the sensitive change, call NIDP with the app, user and action. NIDP loads the policy, checks the user’s carrier network for SIM swap, device swap, roaming and location, and returns allow, step_up or deny with a reason code.
const res = await fetch(NIDP_URL + "/authorize", {
method: "POST",
headers: { authorization: `Bearer ${API_KEY}`, "content-type": "application/json" },
body: JSON.stringify({ appName: "payroll", userId, action: "update_direct_deposit" }),
});
const { decision, reason } = await res.json();
if (decision !== "allow") return blockOrStepUp(reason);
See the developer overview for request and response examples.
Step 4: Handle denials gracefully
A good denial message tells the user what to do next without revealing too much to an attacker. For example: “For your security, bank changes are paused for 72 hours after a phone change. Contact HR to verify your identity.”
Step 5: Expand to login with SSO
Once action-level checks are in place, federate login through NIDP with OIDC or SAML so every session starts with network-aware risk scoring. Learn more about the Network Identity Provider.