> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# What happens in the backend?

> Review the technical journey of a Facial Biometrics session.

**1. Create the session**

The Biometrics node creates a session with the selected mode and sends the reference image in `client`.

**2. Open the link**

The webview reads the mode from `/flow-state` and falls back to `details.faceReferenceSource`.

**3. Validate the reference**

In `government`, the user enters ID and fingerprint code before the selfie. In `client`, the node already supplied the image.

**4. Run liveness**

The only capture is a guided selfie. The webview uses `biometricFlow = ['liveness']`.

**5. Compare faces**

The service compares the approved selfie with the reference image using AWS Rekognition. The browser cannot replace either image.

**6. Deliver the result**

Jelou sends the webhook to the flow or client and returns the user to WhatsApp or `callbackUrl`.

The flow state may include `source`, `skippedStages`, `hasReferenceImage`, and `govAttempts`. If the session expires, the webhook uses `failure_step: "session"` and `failure_reason: "session_expired"`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.