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
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
Field | Type | Description |
---|---|---|
journeyId | String | The current journey id |
blockedTransaction | BlockedTransaction | An object that contains the details of journey blocking reason. Which is detailed below. |
BlockedTransaction
Field | Type | Description |
---|---|---|
blockReasonMessage | String | User-friendly message on the block reason. This message is already shown by IDWise SDK to the user. |
allBlockReasons | List of BlockReason | A 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
Field | Type | Description |
---|---|---|
blockReasonCode | String | A 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 Code | Description |
---|---|
block_reason_vpn | The device is connected through a VPN |
block_reason_location_not_supported | The device's location is outside the allowed regions. |
block_reason_browser_tampering | The browser settings have been altered or manipulated. |
block_reason_browser_incognito | The user is browsing in incognito or private mode. |
block_reason_developer_tools | The browser’s developer tools are active. |
block_reason_high_device_usage | The same device is being used too frequently across multiple sessions. |
block_reason_ip_block_list | The device’s IP address is on a blocklist. |
block_reason_privacy_settings | The browser is set up with enhanced privacy settings. |
block_reason_remote_control_tools | Remote control tools, such as AnyDesk, are active on the device. |
block_reason_cross_device_usage | The same user has switched between multiple devices. |
block_reason_virtual_machine | The 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.
Updated 1 day ago