Token Store
Component Detail
Data Layer
low complexity
Shared Component
mobile
1
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Provides secure persistent storage for JWT access tokens and refresh tokens on the mobile device using the platform Keychain (iOS) or Keystore (Android). Shared across all authentication features that issue tokens, ensuring a single source of truth for the current session credentials.
token-store
Responsibilities
- Read and write JWT access tokens to platform secure storage
- Read and write refresh tokens to platform secure storage
- Clear all stored tokens on logout or account switch
- Check token expiry and signal refresh requirement
Interfaces
saveAccessToken(token)
getAccessToken()
saveRefreshToken(token)
getRefreshToken()
clearTokens()
isAccessTokenExpired()
hasStoredSession()