Service Layer medium complexity Shared Component mobile
3
Dependencies
2
Dependents
2
Entities
1
Integrations

Description

Core service that wraps the Flutter local_auth package and orchestrates the full biometric authentication flow. Checks device capability, triggers the native biometric dialog, and on success refreshes the Supabase session token. Returns typed result objects for UI handling.

Feature: Biometric Session Authentication

biometric-auth-service

Responsibilities

  • Check device biometric capability and enrollment status
  • Invoke native biometric prompt and handle success, failure, and cancellation
  • Refresh Supabase session token upon successful biometric verification
  • Map local_auth error codes to typed domain results

Interfaces

canAuthenticate()
authenticate(localizedReason)
getAvailableBiometrics()
stopAuthentication()
refreshSessionAfterBiometric()
isBiometricEnabled()

Related Data Entities (2)

Data entities managed by this component

Used Integrations (1)

External integrations and APIs this component relies on

API Contract

View full contract →
REST /api/v1/auth/biometric 4 endpoints
GET /api/v1/auth/biometric/availability Check if biometric authentication is available on device
GET /api/v1/auth/biometric/types List supported biometric types on device
POST /api/v1/auth/biometric/authenticate Trigger biometric authentication prompt
POST /api/v1/auth/biometric/enroll Enroll biometric authentication for current user