Auth API Client
Component Detail
Infrastructure
medium complexity
Shared Component
mobile
0
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Shared HTTP client for all authentication-related REST API calls including login, token refresh, and WebAuthn ceremony endpoints. Handles JWT attachment, refresh token rotation, and error normalisation. Used by multiple authentication features to communicate with the backend.
auth-api-client
Responsibilities
- Send WebAuthn registration challenge request and credential submission to backend
- Send WebAuthn authentication challenge request and assertion submission to backend
- Attach and refresh JWT tokens on authenticated requests
- Normalise HTTP error responses into typed auth error objects
Interfaces
getWebAuthnRegistrationChallenge(userId: String): Future<WebAuthnChallenge>
submitWebAuthnRegistration(response: Map): Future<void>
getWebAuthnAuthChallenge(): Future<WebAuthnChallenge>
submitWebAuthnAssertion(response: Map): Future<AuthToken>
login(email: String, password: String): Future<AuthToken>
refreshToken(refreshToken: String): Future<AuthToken>
logout(): Future<void>
Relationships
Related Data Entities (4)
Data entities managed by this component