Skip to main content

Overview

The Biometrics module provides face verification and liveness detection capabilities through third-party provider integrations. It manages facial capture and verification to confirm that the person completing verification matches their identity document and is physically present (not a photo or video).

Accessing the Module

The Biometrics module is accessed through the SDK’s component factory:

Supported Providers

The Biometrics module supports multiple face verification providers:
Each provider has different capabilities, UI/UX, liveness detection methods, and device support. Visit the provider’s website to understand their specific features and limitations.

Configuration Options

Basic Configuration

Common Options

In addition to provider-specific settings, you can configure: Check Processing Pool:

Provider-Specific Options

Onfido Provider

Onfido Options: Supported language values: ar, bg, cs, da, de, el, en_GB, en_US, es, es_419, es_DO, et, fa, fi, fr, fr_CA, he, hi, hr, hu, hy, id, it, ja, ko, lt, lv, ms, nl, no, pl, pt, pt_BR, ro, ru, sk, sl, sr, sv, th, tr, uk, vi, zh_CN, zh_TW Onfido Custom UI Properties: The customUI object allows extensive styling customization:

Sumsub Provider

Sumsub Options: Sumsub Config Object: Sumsub Options Object:

Incode Provider

Incode Options: Supported lang values: bn, ca, zh, hr, nl, en, en-BZ, en-DG, fr, de, ht, hi, hmn, hu, id, it, ms, pl, pt, pt-BR, pt-PT, ro, sr, sr-LATN, so, es, es-ES, tl-PH, tr, vi

IDVerse Provider

IDVerse Options:

Daon Provider

Daon Options:

Methods

mount()

Mounts the Biometrics component to a DOM element and starts the face verification flow. Signature:
Parameters: Description: Mounts the biometric capture interface to the specified DOM element and initiates the face verification flow. The provider’s camera interface will be displayed within this element. Example:

unmount()

Unmounts the Biometrics component from the DOM. Signature:
Description: Removes the Biometrics component from the DOM and cleans up resources, including stopping camera access. Call this when the user navigates away or the verification flow is complete. Example:

Events

The Biometrics module emits events throughout the verification lifecycle:
Provider-Specific Behavior: Events and statuses vary by provider. Not all providers emit all events, and some events are provider-specific. Always test with your chosen provider to understand which events are emitted and when.

vendor_sdk_loaded

Common Event: This event is emitted by all vendor-based modules (IDV, OCR, Biometrics, Device).
Emitted when the provider’s SDK has been successfully loaded.
Parameters:

vendor_sdk_failed_loading

Common Event: This event is emitted by all vendor-based modules (IDV, OCR, Biometrics, Device).
Emitted when the provider’s SDK fails to load.
Parameters:

session_data_generated

Emitted when a biometric verification session has been created with the provider.
Parameters:

session_data_failed_loading

Emitted when session data fails to load.
Parameters:

ready

Emitted when the biometric capture interface is ready for user interaction.
Parameters:

input_required

Emitted when a non-positive flow has occurred but is likely recoverable by retrying.
Parameters: Description: This event indicates that verification cannot proceed in its current state, but the issue is typically recoverable. Common scenarios include:
  • User closed the verification session
  • Session timeout occurred
  • Waiting for selfie capture
  • Awaiting user consent
  • Camera permission denied
The user can typically retry the verification process to resolve these issues.

detection_complete

Emitted when the biometric capture process has completed successfully.
Parameters:

detection_failed

Emitted when the biometric capture process fails.
Parameters:

processing

Emitted when biometric data is being processed by the provider.
Parameters:

results

Emitted when the biometric verification process completes with results.
Parameters:

session_closed

Emitted when the verification session is closed normally.
Parameters: None

session_interrupted

Emitted when the verification session is interrupted by the user.
Parameters:
Provider-Specific:
  • Onfido: Emits this when the verification modal is closed.

vendor_event

Emitted for provider-specific events that don’t map to standard events.
Parameters:

Complete Example


Best Practices

  1. Handle all events, not just results - The results event only fires with COMPLETE or FAILED. Also listen to input_required (for recoverable states like INCOMPLETE or INTERRUPTED), error (for system failures), and processing (for intermediate states).
  2. Set up event listeners before mounting - Register all event handlers before calling mount() to avoid missing events.
  3. Unmount on navigation - Always call unmount() when the user leaves the page to clean up resources.
  4. Provider-specific configuration - Review each provider’s documentation for optimal configuration.
  5. Error handling - Always listen to the error event and provide user-friendly error messages.

Common Issues

Component not displaying

Ensure the mount element exists in the DOM and has sufficient size:

Session data failed to load

This usually means the backend session setup failed. Ensure your backend is correctly generating biometric verification tokens.

Provider-specific errors

Check the vendor_event emissions for provider-specific error details and consult the provider’s documentation.