Face verification
Introduction
MobbID allows you to perform several biometric operations between the user that has been previously enrolled and the user using the app. This process performs a face recognition between the user's face and the face that was previously enrolled (1:1).
NOTE: Contact the support team to obtain more information about it.
Face verification
This method opens the camera UI and starts the face verification process.
const successCallback = (result) => {
console.log("✅ verificating face");
};
const errorCallback = (error) => {
console.log("❌ verificating face");
};
const userId = "12345678X";
const livenessMethod = "HEAD_PASSIVE_IMAGE";
MobbIdApi.faceVerification(successCallback, errorCallback, userId, livenessMethod);
The method has four parameters:
successCallback: function which will be called when the face recognition finishes successfully. It will receive an object with the following attributes:result: this could be"USER_VERIFIED"or"USER_NOT_VERIFIED".data: extra data about the verification result. It contains the following attributes:operationId: identifier of the verification operation.userId: identifier of the verified user.
errorCallback: function which will be called when the face recognition fails for any reason. It will receive an object with the following attributes:errorCode: specific code identifying the error.errorDetails: additional information or context about the error.
userId: identifier of the user that has been previously enrolled.livenessDetectionMode: liveness detection mode. It could be"HEAD_PASSIVE"or"HEAD_PASSIVE_IMAGE".
