FLUTTER ECOSYSTEM

dio_refresh_bot

Dio interceptor which makes refresh token mechanism simple, flexible and reactive.

Latest version
2.2.1
30-day downloads
114
Likes
30
Pub points
150

Package Overview

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

Overview

Dio Refresh Bot is a Flutter/Dart package that simplifies the implementation of refresh token mechanisms for Dio HTTP clients. It provides a reactive, flexible interceptor system to automatically handle token expiration and refresh without disrupting ongoing requests. By integrating seamlessly with Dio, it ensures secure and uninterrupted API communication. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform applications requiring robust authentication workflows.

Use cases
  • Automatic token refresh on 401 errors
  • Handling expired JWT tokens in APIs
  • Securing RESTful services with OAuth
  • Maintaining authenticated sessions across app restarts
  • Reactive request retry after token refresh
Key features
  • Reactive token refresh handling
  • Configurable retry logic
  • Supports multiple auth types
  • Minimal boilerplate code
  • Cross-platform compatibility
Suitable for
  • Apps using JWT or OAuth2
  • Developers needing automatic auth recovery
  • Projects with frequent API calls
  • Teams prioritizing security and UX
  • Flutter apps with complex authentication flows
Considerations
  • Requires proper server-side token refresh endpoints
  • May need custom error handling for edge cases
  • Depends on Dio being used as HTTP client
  • Not suitable for stateless token systems
  • Needs careful configuration to avoid infinite loops
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add dio_refresh_bot

Categories

Dependencies

Dependency list 5 items

Source repository

Related projects

No data available yet.