AI Face Login
This module adds face recognition for user login and registration in Drupal. It securely stores face data as encrypted numeric embeddings rather than photos, allowing users to log in or sign up using their faces.
Provides optional face recognition based login and registration for Drupal 11.
Face descriptors are encrypted at rest with AES-256-CBC. No photos are ever
stored — only a 128-float numeric embedding.
Requirements
- Drupal 11
- PHP `openssl` extension
- Drush (for downloading required assets)
- A configured private files directory (strongly recommended)
Installation
1. Require the module
composer require drupal/ai_face_login
2. Enable the module
drush en ai_face_login
3. Download required assets
drush ai-face-login:download-assets
4. Rebuild caches
drush cr
Configuration
Navigate to **Administration → Configuration → People → AI Face Login**
(`/admin/config/people/ai-face-login`) to configure:
- **Similarity threshold** — Euclidean distance between face descriptors.
Lower values are stricter. Default: `0.4`.
- **Brute-force protection** — Maximum verification attempts and time window
per IP address.
Registering a face
1. Log in with your standard username and password.
2. Go to your user profile page.
3. Click "Register Face" and follow the on-screen instructions.
4. Allow camera access when prompted and click "Capture & Register".
Logging in with face
1. Go to the login page (`/user/login`) and click "Login with Face",
or navigate directly to `/ai-face/login-face`.
2. Enter your username or email address.
3. Click "Capture & Login" and allow camera access.