Search packages, repositories and app categories

Package detailsv2.2.1

dio_refresh_bot

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

AndroidiOSWebmacOSWindowsLinux
30-day downloads
175
Likes
30
Pub points
140

Install package

flutter pub add dio_refresh_bot

Package Overview

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

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

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Bots :robot:

A useful flutter packages.

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package

No data available yet.