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

FieldTypeDescription
journeyIdStringThe ID of the blocked journey
blockedTransactionBlockedTransactionContains the reason and conditions of the block

BlockedTransaction

FieldTypeDescription
canRetryBooleanOnly applicable in Dynamic SDK mode
blockReasonMessageStringMessage shown to the user, already handled by the SDK
allBlockReasonsList<BlockReason>List of all unmet conditions; the first is the highest priority

BlockReason

FieldTypeDescription
blockReasonCodeStringUnique code identifying the cause of the block

Block Reason Codes

CodeDescription
block_reason_vpnVPN or proxy detected
block_reason_rooted_deviceRooted or jailbroken device
block_reason_browser_tamperingSuspicious browser environment
block_reason_browser_incognitoIncognito/private browsing detected
block_reason_developer_toolsDeveloper/debugging tools are active
block_reason_emulatorEmulator environment detected
block_reason_high_device_usageDevice has excessive journey attempts
block_reason_ip_restrictionIP address outside allowed range
block_reason_location_not_supportedUnsupported geolocation
block_reason_ip_block_listIP address on blocklist
block_reason_cloned_appApplication clone detected
block_reason_location_spoofingFake GPS or geolocation masking tools
block_reason_privacy_settingsDevice privacy settings prevent evaluation
block_reason_remote_control_toolsRemote control or remote access tools found
block_reason_cross_device_usageSuspicious cross-device journey behavior
block_reason_fridaFrida (dynamic instrumentation) detected
block_reason_virtual_machineVirtual machine detected
block_reason_assistance_requiredUser/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