Handling Journey Auto Blocking in WebSDK

Overview

Journey Auto-Blocking is a security feature in IDWise that stops the onboarding process when one or more high-risk conditions are detected. This helps prevent suspicious or non-compliant sessions from proceeding further.

For example, when Device Intelligence is enabled, the SDK evaluates smart signals such as rooted devices, emulators, or VPN usage. If any configured condition is not met, the journey is automatically blocked, and the user is shown a clear error message.

📘

Info

Minimum SDK Version that supports this feature is 5.4.0

Implementation

If you're using the Standard SDK, IDWise automatically:

  • Evaluates all preconditions on start of the journey.
  • Notifies the user if the device is blocked.
  • Displays an in-app error screen explaining the issue.

Example: Rooted Device Error Screen

Example error screen when rooted device is detected

Optional Callbacks for Journey Blocked

In addition to the built-in error screen, you can listen for the onJourneyBlocked callback to take additional action in your app logic.

Callback Behavior

  • Triggered when a journey is blocked
  • onJourneyCancelled will not be triggered in this case
  • Useful for analytics, user notifications, or custom UX

You can subscribe to this callback to be notified if the user faced a block and can no longer proceed further:

<script>
  let global_idwise;

  function onJourneyBlocked(journeyBlockedDetails) {
    console.log("IDWiseSDKCallback journeyId:", journeyBlockedDetails.journeyId);
    console.log("IDWiseSDKCallback blockedTransaction:", journeyBlockedDetails.blockedTransaction);
    // IDWise SDK already informed the user of the block reason
    // Optionally you can add extra logic here to do extra handling if you need
  }
  //...
  
  const eventHandlers = {
    //...
    onJourneyBlocked: onJourneyBlocked,
    //...
  };

  function resume() {
    global_idwise.resumeJourney({
      flowId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      mount: "#idwise-mount",
      journeyId: "xxxxxxxxxxxxxxxx",
      eventHandlers,
    });
  }

  function start() {
    global_idwise.startJourney({
      flowId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      mount: "#idwise-mount",
      referenceNo: "xxx",
      eventHandlers,
    });
  }

  IDWise.initialize({
    clientKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    locale: "en",
  })
    .then(idwise => {
      global_idwise = idwise;
      // if this is the first time the user tries to do verification
      start();
      // or the user already started a verification session and interrupted it before finishing. We can resume it.
      resume();
    })
    .catch(error => {
      alert(error);
    });
</script>

Data Structures

JourneyBlockedInfo

FieldTypeDescription
journeyIdStringThe current journey id
blockedTransactionBlockedTransactionAn object that contains the details of journey blocking reason. Which is detailed below.

BlockedTransaction

FieldTypeDescription
blockReasonMessageStringUser-friendly message on the block reason. This message is already shown by IDWise SDK to the user.
allBlockReasonsList of BlockReasonA list contains all the preconditions that are enabled on your Device Intelligence block in this flow but were not satisfied. The first element in the list is the highest priority.

BlockReason

FieldTypeDescription
blockReasonCodeStringA unique code that identifies the blocking reason. Please refer to the table below for a list of reason codes for each precondition

Block Reason Codes

Block Reason CodeDescription
block_reason_vpnThe device is connected through a VPN
block_reason_location_not_supportedThe device's location is outside the allowed regions.
block_reason_browser_tamperingThe browser settings have been altered or manipulated.
block_reason_browser_incognitoThe user is browsing in incognito or private mode.
block_reason_developer_toolsThe browser’s developer tools are active.
block_reason_high_device_usageThe same device is being used too frequently across multiple sessions.
block_reason_ip_block_listThe device’s IP address is on a blocklist.
block_reason_privacy_settingsThe browser is set up with enhanced privacy settings.
block_reason_remote_control_toolsRemote control tools, such as AnyDesk, are active on the device.
block_reason_cross_device_usageThe same user has switched between multiple devices.
block_reason_virtual_machineThe browser is running inside a virtual machine.

📘

Note

Only the pre-conditions you enable on your Device Intelligence block in your flow will be checked. Any conditions that are turned off will not be checked.