Handling Journey Auto Blocking in Dynamic SDK
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
When using the Dynamic SDK, IDWise SDK automatically
- Evaluates all preconditions on start of the journey.
onJourneyBlocked
will be Triggered when a journey is blocked.onJourneyCancelled
will not be triggered in this case
Your application is responsible to use the details onJourneyBlocked
for:
- Displaying an appropriate message to the user
- Deciding how to guide them (e.g. use a different device, disable VPN, or contact support)
Subscribe to onJourneyBlocked
callback to be notified if the user faces a block:
override fun onJourneyBlocked(journeyBlockedInfo: JourneyBlockedInfo) {
Log.d("IDWiseSDKCallback", "onJourneyBlocked $journeyBlockedInfo")
// IDWise UI is hidden by this point and the UI control is back with your app
// Show an error screen to the user to inform them they cannot proceed until they address the issue
// You can use the message in journeyBlockedInfo.blockReasonMessage or use your own message
// You can access a list of reasons that caused the block from journeyBlockedInfo.allBlockReasons
// You can examine the canRetry flag and if true allow your user to fix the issue and retry again
}
func onJourneyBlocked(journeyBlockedInfo: JourneyBlockedInfo) {
print("IDWiseSDKCallback", "onJourneyBlocked \(journeyBlockedInfo)")
// IDWise UI is hidden by this point and the UI control is back with your app
// Show an error screen to the user to inform them they cannot proceed until they address the issue
// You can use the message in journeyBlockedInfo.blockReasonMessage or use your own message
// You can access a list of reasons that caused the block from journeyBlockedInfo.allBlockReasons
// You can examine the canRetry flag and if true allow your user to fix the issue and retry again
}
onJourneyBlocked: (dynamic journeyInfo) {
// IDWise UI is hidden by this point and the UI control is back with your app
// Show an error screen to the user to inform them they cannot proceed until they address the issue
// You can use the message in journeyBlockedInfo.blockReasonMessage or use your own message
// You can access a list of reasons that caused the block from journeyBlockedInfo.allBlockReasons
// You can examine the canRetry flag and if true allow your user to fix the issue and retry again
}
onJourneyBlocked(data) {
// IDWise UI is hidden by this point and the UI control is back with your app
// Show an error screen to the user to inform them they cannot proceed until they address the issue
// You can use the message in journeyBlockedInfo.blockReasonMessage or use your own message
// You can access a list of reasons that caused the block from journeyBlockedInfo.allBlockReasons
// You can examine the canRetry flag and if true allow your user to fix the issue and retry again
}
onJourneyBlocked(journeyBlockedInfo) {
console.log(`onJourneyBlocked ${journeyBlockedInfo.journeyId}`);
// IDWise UI is hidden by this point and the UI control is back with your app
// Show an error screen to the user to inform them they cannot proceed until they address the issue
// You can use the message in journeyBlockedInfo.blockReasonMessage or use your own message
// You can access a list of reasons that caused the block from journeyBlockedInfo.allBlockReasons
// You can examine the canRetry flag and if true allow your user to fix the issue and retry again
},
Data Structures
JourneyBlockedInfo
Field | Type | Description |
---|---|---|
journeyId | String | The ID of the blocked journey |
blockedTransaction | BlockedTransaction | Contains the reason and conditions of the block |
BlockedTransaction
Field | Type | Description |
---|---|---|
canRetry | Boolean | Only applicable in Dynamic SDK mode |
blockReasonMessage | String | Message shown to the user, already handled by the SDK |
allBlockReasons | List<BlockReason> | List of all unmet conditions; the first is the highest priority |
BlockReason
Field | Type | Description |
---|---|---|
blockReasonCode | String | Unique code identifying the cause of the block |
Block Reason Codes
Code | Description |
---|---|
block_reason_vpn | VPN or proxy detected |
block_reason_rooted_device | Rooted or jailbroken device |
block_reason_browser_tampering | Suspicious browser environment |
block_reason_browser_incognito | Incognito/private browsing detected |
block_reason_developer_tools | Developer/debugging tools are active |
block_reason_emulator | Emulator environment detected |
block_reason_high_device_usage | Device has excessive journey attempts |
block_reason_ip_restriction | IP address outside allowed range |
block_reason_location_not_supported | Unsupported geolocation |
block_reason_ip_block_list | IP address on blocklist |
block_reason_cloned_app | Application clone detected |
block_reason_location_spoofing | Fake GPS or geolocation masking tools |
block_reason_privacy_settings | Device privacy settings prevent evaluation |
block_reason_remote_control_tools | Remote control or remote access tools found |
block_reason_cross_device_usage | Suspicious cross-device journey behavior |
block_reason_frida | Frida (dynamic instrumentation) detected |
block_reason_virtual_machine | Virtual machine detected |
block_reason_assistance_required | User/device flagged for manual assistance |
Detecting Existing Block Before Resuming a Journey
Before resuming an existing journey you can check if the device is blocked due to Device Intelligence conditions not being satisfied
// When your user is trying to continue the verification from last session they started
IDWiseDynamic.initialize()
if IDWiseDynamic.isDeviceBlocked() then
// Handle the case this device was already blocked last time the user tried to do the verification
// For example you can inform your user that they should use a different device to continue
else
// No device block from last time. Resume the journey for the user
IDWiseDynamic.resumeJourney()
// When your user is trying to continue the verification from last session they started
IDWiseDynamic.initialize(clientKey: "<CLIENT_KEY>",theme: "<THEME>", onError: { error in })
if IDWiseDynamic.isDeviceBlocked() {
// Handle the case this device was already blocked last time the user tried to do the verification
// You can inform your user that they should use a different device to continue
} else {
// No device block from last time. Resume the journey for the user
IDWiseDynamic.resumeJourney(flowId: "<FLOW_ID>", journeyId: "<JOURNEY_ID>", journeyCallbacks: self)
}
...
...
...
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.
You can check out the Dynamic SDK sample app for an example on how to implement Device Intelligence blocking end to end
Updated 1 day ago