Step-up for risky actions (Pilot)

Keep sign-up light. Ask for a Nod ID check only when your own risk signals say so: a payout, a password reset, a flagged account.

Read the integration guide first (steps 1 to 7). Nod ID does not decide what is risky. Your risk logic does, and calls Nod ID when it needs a stronger answer.

1. Decide when to step up

type Action = 'payout' | 'password_reset' | 'login';

function needsStepUp(user: User, action: Action, signals: Signals): boolean {
  if (user.verified) return false;               // already passed, nothing to ask
  if (action === 'payout' && signals.amount > 500) return true;
  if (action === 'password_reset') return true;
  return signals.flagged;                        // your own score or rule
}

2. Create a session, ask the app to show the sheet

From your server, only when needsStepUp is true. The secret key stays on your server.

const r = await fetch('https://api.nodid.app/v1/sessions', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.NODID_SECRET_KEY}` },
});
const { sessionId } = await r.json();
await db.pending.set(user.id, { sessionId, action }); // remember what it was for
return { stepUp: true, sessionId };                   // the app presents NodIDVerifyView(sessionId:)

3. Hold the action until the result is back

Check the result on your server before you let the action through.

const res = await fetch(`https://api.nodid.app/v1/sessions/${sessionId}/result`, {
  headers: { Authorization: `Bearer ${process.env.NODID_SECRET_KEY}` },
});
if (res.status === 202) return hold();               // still pending
const out = await res.json();
if (out.outcome === 'verified') return allow(action);
return deny(action);                                  // not_verified, cancelled or technical_error

For cancelled and technical_error, offer another try. For not_verified, offer support. You are never told why.

Notes

  • Every session is single use and expires in minutes, so create a new one per attempt.
  • To check that it is the same person as the account, also compare the person code (see the recovery guide).
  • Each step-up check is a verification and is counted like any other.