FLUTTER ECOSYSTEM

fresh_dio

An http interceptor for token refresh. Fresh is built on top of package:dio and manages authentication tokens transparently.

Latest version
0.6.0
30-day downloads
19K
Likes
169
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

Fresh Dio is a lightweight HTTP interceptor built on top of Dio that automates token refresh during API requests. It handles authentication tokens transparently, ensuring secure and uninterrupted access to protected endpoints. By intercepting requests and refreshing expired tokens seamlessly, it reduces boilerplate code and improves user experience. Ideal for apps requiring robust authentication workflows with minimal setup.

Use cases
  • Automatic token refresh during API calls
  • Handling expired JWT tokens
  • Securing authenticated API endpoints
  • Reducing manual token management
  • Improving login session persistence
  • Simplifying auth state handling
Key features
  • Built on top of Dio
  • Transparent token refresh
  • Supports JWT and similar tokens
  • Minimal configuration required
  • Intercepts requests automatically
  • Handles retry logic on 401 errors
Suitable for
  • Apps using JWT authentication
  • Projects with frequent API interactions
  • Developers seeking reduced auth boilerplate
  • Mobile and web applications with session management
  • Teams prioritizing clean, maintainable auth code
Considerations
  • Requires integration with existing Dio setup
  • Limited to token-based auth flows
  • May need custom logic for non-standard token formats
  • Depends on external network availability for refresh
  • Not suitable for stateless or tokenless APIs
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add fresh_dio

Categories

Dependencies

Dependency list 2 items

Source repository

Related projects

No data available yet.