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
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 Config Object:
Sumsub Options Object:
Incode Provider
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
Daon Provider
Methods
mount()
Mounts the Biometrics component to a DOM element and starts the face verification flow.
Signature:
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:
Events
The Biometrics module emits events throughout the verification lifecycle:vendor_sdk_loaded
Common Event: This event is emitted by all vendor-based modules (IDV, OCR, Biometrics, Device).
vendor_sdk_failed_loading
Common Event: This event is emitted by all vendor-based modules (IDV, OCR, Biometrics, Device).
session_data_generated
Emitted when a biometric verification session has been created with the provider.
session_data_failed_loading
Emitted when session data fails to load.
ready
Emitted when the biometric capture interface is ready for user interaction.
input_required
Emitted when a non-positive flow has occurred but is likely recoverable by retrying.
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
detection_complete
Emitted when the biometric capture process has completed successfully.
detection_failed
Emitted when the biometric capture process fails.
processing
Emitted when biometric data is being processed by the provider.
results
Emitted when the biometric verification process completes with results.
session_closed
Emitted when the verification session is closed normally.
session_interrupted
Emitted when the verification session is interrupted by the user.
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.
Complete Example
Best Practices
-
Handle all events, not just
results- Theresultsevent only fires withCOMPLETEorFAILED. Also listen toinput_required(for recoverable states like INCOMPLETE or INTERRUPTED),error(for system failures), andprocessing(for intermediate states). -
Set up event listeners before mounting - Register all event handlers before calling
mount()to avoid missing events. -
Unmount on navigation - Always call
unmount()when the user leaves the page to clean up resources. - Provider-specific configuration - Review each provider’s documentation for optimal configuration.
-
Error handling - Always listen to the
errorevent 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 thevendor_event emissions for provider-specific error details and consult the provider’s documentation.
Related Resources
- SDK Initialization - OneSDK setup and configuration
- IDV Module - Combined document + biometric verification
- OCR Module - Document capture (often used before biometrics)
- Individual Module - Entity data management