---
title: "Face Login"
url: "https://developer.incode.com/sdk-reference/cordova-face-login/"
section: "sdk-reference"
group: "Cordova SDK"
version: "v1.1"
status: "live"
---
# Face Login

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](/sdk-reference/cordova-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

```javascript
cordova.exec(
  function (result) { console.log(JSON.stringify(result)); },
  function (err) { console.log(err); },
  "Cplugin",
  "startFaceLogin",
  []  // or [{ e2eEncryptionEnabled: true }] on Android for E2EE
);
```

## FaceLoginResult

On **iOS**, the success callback receives a mapped object with these fields:

- `image`: object. Selfie image captured during login (`pngBase64`, and `encryptedBase64` when E2EE is enabled).
- `spoofAttempt`: bool. `true` indicates the user tried to spoof the system (using a photo, screen, or other method). `false` indicates a real person.
- `faceMatched`: bool. `true` if the faces matched, `false` otherwise.
- `customerUUID`: string or `null`. Unique user identifier if authentication succeeded. `null` if `faceMatched` is `false`.
- `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.

On **Android**, the callback receives the native `SelfieScanResult` JSON (Gson). See [Results — startFaceLogin()](/sdk-reference/cordova-results/#startfacelogin).

## End-to-End Encryption (E2EE)

:::info
  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`.

```javascript
// Android only; requires e2eeUrl in initializeSDK
cordova.exec(success, error, "Cplugin", "startFaceLogin", [
  { e2eEncryptionEnabled: true }
]);
```

See [End-to-End Encryption (E2EE)](/sdk-reference/cordova-e2ee/) for full E2EE setup.