Skip to main content

Face verification (1:1)

Face verification compares the face of the person using the app with the face enrolled for a user (1:1). The plugin opens the capture screen, applies liveness and runs the comparison on your MobbID server.

MobbIdApi.faceVerification(onSuccess, onError, userId, livenessMethod);

Parameters​

ParameterTypeDescription
onSuccess(result) => voidCalled when the verification is completed. See Result.
onError(error) => voidCalled when the verification cannot be completed. See Error handling.
userIdstringIdentifier of the enrolled user.
livenessMethodstringLiveness method. See Liveness methods.

Liveness methods​

ValueCaptureDescription
HEAD_PASSIVE_IMAGEImagePassive liveness on a single image. The user only looks at the camera. Recommended.
HEAD_PASSIVEVideoPassive liveness on a short video.

Both methods are passive: the user does not have to move or follow instructions.

Result​

{
"result": "USER_VERIFIED",
"data": {
"operationId": "2f4c1c4e-6b39-4c8b-9a51-1a0f8a3c7d20"
}
}
PropertyTypeDescription
resultstringUSER_VERIFIED when the face matches the enrolled user, USER_NOT_VERIFIED otherwise.
data.operationIdstringIdentifier of the verification operation on your MobbID server.
Take the decision in your backend

The result received by the app drives the user interface only. Send operationId to your backend and read the operation with Get an operation before granting access.

Recommendations​

  • Limit the number of attempts per session and, after repeated failures, offer an alternative authentication method.
  • Request the token right before the verification, so that it remains valid during the whole operation.

Next steps​