Face Login authenticates a user by performing a face match between a captured selfie and a previously enrolled face. Call startFaceLogin() to authenticate an enrolled user. The only argument is an optional sessionConfig object.
Prerequisites
- The SDK is initialized. See Installation.
- The user has an approved account with an enrolled face.
Enrollment happens as a byproduct of a standard onboarding flow that includes the addFaceMatch module. Alternatively, an admin can enroll a user by clicking Add face to Database in Dashboard.
Start Face Login
cordova.exec(
function (result) { console.log(JSON.stringify(result)); },
function (err) { console.log(err); },
"Cplugin",
"startFaceLogin",
[] // or [{ e2eEncryptionEnabled: true }] on Android for E2EE
);
FaceLoginResult
FaceLoginResult contains the following fields:
image: object. Selfie image captured during login.spoofAttempt: bool.trueindicates the user tried to spoof the system (using a photo, screen, or other method).falseindicates a real person.faceMatched: bool.trueif the faces matched,falseotherwise.customerUUID: string ornull. Unique user identifier if authentication succeeded.nulliffaceMatchedisfalse.interviewId: string. Session ID in which the user was approved.interviewToken: string. Session token in which the user was approved.token: string. Token that can be used for further API calls.transactionId: string. Unique identifier of the Face Login attempt.hasFaceMask: bool. Indicator if the login attempt failed because the user was wearing a face mask.
End-to-End Encryption (E2EE)
Info
Android only
End-to-End Encryption (E2EE) for Face Login is supported on Android only.
By default, Face Login does not use E2EE. To enable it, set e2eEncryptionEnabled to true.
// Android only; requires e2eeUrl in initializeSDK
cordova.exec(success, error, "Cplugin", "startFaceLogin", [
{ e2eEncryptionEnabled: true }
]);
See End-to-End Encryption (E2EE) for full E2EE setup.