Face authentication for iFrame
In order to have face authentication with iFrame, you will have to directly insert verification platform:
https://face.authentication.idenfy.com/?token={{token}}
with token query string parameter into your iframe tag. The token can be retrieved after generating a token.
After the process is finished, you may close the iframe and display a desired page to your client.
Examples
Query string parameter name | Example value |
---|---|
token | 3FA5TFPA2ZE3LMPGGS1EGOJNJE |
An example redirect url:
https://face.authentication.idenfy.com/?token=3FA5TFPA2ZE3LMPGGS1EGOJNJE
Code example
<!DOCTYPE html>
<html>
<body>
<iframe
id="iframe"
style="width: 80%; height: 800px"
src="https://face.authentication.idenfy.com/?token=3FA5TFPA2ZE3LMPGGS1EGOJNJE"
allow="camera"></iframe>
<p id="display"></p>
<script>
window.addEventListener('message', receiveMessage, false);
function receiveMessage(event) {
console.log(event);
// ...
}
</script>
</body>
</html>
Webhook
It is possible to receive information when actions related to face authentication are being performed by setting up a FACIAL_AUTHENTICATION
notification type webhook.
Descriptions of possible status
values
Name | Description |
---|---|
SUCCESS | Authentication is successfull. This message is also sent upon successful ENROLLMENT. |
FAILED | Authentication failed due to fraudulent activity or other possible vulnerabilities. This message is also sent upon ENROLLMENT failure. |
EXPIRED | Face authentication token expired before the user started the process. |
CANCELED | Face authentication session was cancelled by the user. |
Possible failReason
values
FACE_MISMATCH
FAKE_FACE
VIRTUAL_CAMERA
FACE_NOT_FOUND
TOO_MANY_FACES
FACE_ANGLE_TOO_LARGE
FACE_TOO_SMALL
FACE_CLOSE_TO_BORDER
FACE_TOO_CLOSE
FACE_CROPPED
FACE_IS_OCCLUDED
EYES_CLOSED
FAILED_TO_PREDICT_LANDMARKS
PROBABILITY_TOO_SMALL
FAKE_CAPTURE
DUPLICATE_IMAGE
Response example - EXPIRED
{
"id": "8d471b4c-3822-4547-aec5-a9d0cc0aa105",
"scanRef": "8df398bb-7340-11ee-9aec-0221b1f59063",
"clientId": "FD155HLZ5Z",
"status": "EXPIRED",
"token": "UbYZnDdrTElsSDBQFeNkd8MxI9CpSEO0qR5jtRcz",
"type": "AUTHENTICATION",
"method": "FACE_MATCHING",
"facePhoto": null,
"failReason": null,
"ipAddress": null
}
Posssible values to check status of face authentication:
Information about the face authentication statuses could be found in console, on data object.
Information about the verification auto status status:
Name | Description |
---|---|
APPROVED | The user completed a face authentication process, and it was approved. |
FAILED | The user completed a face authentication process, but it failed. |
To assess the face authentication session, the webhook(s) sent from our back-office should be evaluated, as the statuses in the iFrame console are complementary.