Token Store
Component Detail
Data Layer
low complexity
mobile
0
Dependencies
3
Dependents
0
Entities
0
Integrations
Description
Secure on-device storage adapter for JWT access and refresh tokens on the Flutter mobile app. Uses Flutter Secure Storage backed by iOS Keychain and Android Keystore. Provides a typed interface for persisting, reading, and clearing tokens across app sessions.
token-store
Responsibilities
- Persist JWT access token and refresh token to platform-native secure storage
- Read stored tokens on app launch to restore authenticated session
- Clear all tokens on logout or token invalidation
- Expose typed read/write interface to the AuthRepository
Interfaces
saveTokens(accessToken: String, refreshToken: String) -> Future<void>
getAccessToken() -> Future<String?>
getRefreshToken() -> Future<String?>
clearTokens() -> Future<void>
hasValidSession() -> Future<bool>
Relationships
Dependents (3)
Components that depend on this component