For the complete documentation index, see llms.txt. This page is also available as Markdown.

Results

Results offered by the Selphi Widget component.

On this page we will explain the different possibilities for finishing the widget capture process.

Every detail of every event (attributes, data...) has been specified on the page (Events).

Success cases

Successful capture and extraction

At the moment the Biometric Template capture is completed, the extracted results will be provided in the event extractionFinish (link).

Once this event is emitted, the logic for loading the next view or Widget must be implemented in accordance with the application's context.

Here is an example:

import { type ExtractionFinishEvent } from "@facephi/selphi-web-component";

const selphiWidget = document.querySelector('facephi-selphi-widget');
selphiWidget.addEventListener('extractionFinish', onExtractionFinish);

function onExtractionFinish(event: CustomEvent<ExtractionFinishEvent>) {
  const result = event.detail.detail;
  console.log('extractionFinish:', result);

  // Procesar los resultados en el backend
  saveResults(result.extractionData.bestImage, result.extractionData.templateRaw);

  // Cargar el siguiente widget o vista
  loadNextView();
}

Error cases

It is recommended to handle possible errors that may occur when processing the obtained data to avoid internal malfunction, misuse of the widget, or brute-force attacks.

Error codes

The widget will throw an exception if any usage or internal error occurs.

Exceptions can be of two types:

  • Terminal exception: Error that will be thrown when the widget cannot continue its execution. These errors may occur in incorrect environments or configurations.

  • Extraction exception: Error that will be thrown during the capture or extraction flow. These errors allow the widget flow to be retried, since they are due to incorrect use of the widget by the user.

Error
Code
Description

Terminal exceptions

AndroidWebViewBehaviour

SPI_227

Error produced after the component is executed in a WebView in an Android environment.

UnknownInternalError

SPI_235

Internal error in the widget. If the error persists, it will be necessary to contact the Facephi support team

CameraHardwareError

SPI_204

Error produced during access to the device cameras.

PermissionsDenied

SPI_242

Error generated by not allowing the necessary permissions for the widget to run.

CameraPermissionDenied

SPI_201

Error due to not granting permission to use the device camera(s).

MicrophonePermissionDenied

SPI_218

Error generated when permission is not granted to use the device's microphone(s).

SettingsError

SPI_219

Error produced by an incorrect configuration.

BrowserApiNotCompatible

SPI_220

Error produced by an unsupported browser.

SpoofingDetected

SPI_221

Error generated when an injection attack is detected in the widget.

ActiveLivenessError

SPI_205

Error generated when the active liveness check fails during widget execution.

Extraction exceptions

ErrorTimeout

SPI_001

Error generated when the established time limit for extraction has been exceeded.

FaceNotFound

SPI_222

Error generated when no face is found during the capture process.

EyesNotFound

SPI_223

Error generated when the eyes are not detected during the capture process.

OccludedEyes

SPI_237

Error generated when covered eyes are recognized during the capture process.

OccludedMouth

SPI_238

Error generated when a covered mouth is recognized during the capture process.

DarkLightError

SPI_224

Error generated when low lighting is detected during the capture process.

AngleExceeded

SPI_225

Error generated when an excessive angle of the user's face is detected during the capture process.

TooManyFaces

SPI_226

Error generated when multiple faces are detected during the capture process.

NotStabilizedSunGlasses

SPI_223

Error generated when sunglasses are detected on the user during the capture process.

NotStabilizedNoColor

SPI_224

Error generated when no color is detected during the capture process.


Time limit exceeded during Biometric Template capture

With the events extractionTimeout (link) and timeoutErrorButtonClick (link) it is possible to control when the user exceeds the allotted time or the attempts used.

Here is an example:


Capture attempts exhausted

As an alternative to the manual counting in the previous section, the property maxAttempts delegates the attempt limit to the widget itself. When they are exhausted, the widget stops retrying and emits maxAttemptsExceeded (link).

Here is an example:


The user closes the widget before document capture

This event is emitted when the user clicks the widget exit icon to cancel the extraction process. Once the button is pressed, the widget will close.

Code example


Terminal exceptions during the Widget lifecycle

This event is emitted when a system malfunction is detected. It can be used to identify and filter different types of errors found during the capture process.

Code example:


Last updated