Biometric Auth Service
Component Detail
Service Layer
medium complexity
mobile
2
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Core service that orchestrates biometric authentication using the local_auth Flutter plugin. Handles capability detection, invokes the OS biometric prompt, reads the stored refresh token on success, and exchanges it for a new access token via the auth API.
biometric-auth-service
Responsibilities
- Detect biometric hardware availability and enrollment status
- Invoke OS-level biometric prompt (iOS LocalAuthentication / Android BiometricPrompt)
- Read refresh token from Secure Credential Store on successful biometric verification
- Exchange refresh token for new access token via POST /api/v1/auth/refresh
- Handle fallback to PIN or full re-authentication on repeated biometric failure
Interfaces
isBiometricAvailable() -> Future<bool>
isBiometricEnrolled() -> Future<bool>
authenticate(reason: String) -> Future<BiometricResult>
refreshSessionWithStoredToken() -> Future<AuthSession>
clearBiometricSession()
getBiometricType() -> BiometricType
canUseBiometrics() -> Future<BiometricCapability>
Relationships
Dependencies (2)
Components this component depends on
Related Data Entities (4)
Data entities managed by this component