Auth Service
Component Detail
Service Layer
medium complexity
mobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations
Description
Business logic layer orchestrating all email/password authentication operations including login, logout, password reset, and session lifecycle management. Translates Supabase AuthException types into localized, user-friendly error messages and coordinates BLoC state transitions. Acts as the single point of contact between UI components and the Auth Repository, enforcing validation rules before delegating to data layer.
auth-service
Responsibilities
- Validate email format and password requirements before submission
- Delegate credential authentication to Auth Repository and propagate results
- Initiate and manage password reset email dispatch and deep-link token verification
- Map Supabase AuthException codes to localized error messages
- Manage session persistence and user role resolution post-login
Interfaces
signInWithEmailPassword(email, password)
sendPasswordResetEmail(email)
verifyPasswordResetToken(token)
updatePassword(newPassword)
signOut()
getCurrentSession()
isAuthenticated()
getAuthErrorMessage(AuthException)
Related Data Entities (2)
Data entities managed by this component