dio_auth_guard 0.0.1 copy "dio_auth_guard: ^0.0.1" to clipboard
dio_auth_guard: ^0.0.1 copied to clipboard

Automatically handles 401/403 responses in Dio — cancels all in-flight requests and navigates to a custom unauthenticated screen. Router-agnostic.

0.0.1 #

  • Initial release
  • AuthGuard singleton with debounced 401/403 handling
  • CancelToken management for in-flight request cancellation
  • Router-agnostic navigation via onUnauthenticated callback or unauthWidget
  • AuthGuardModule for easy Dio interceptor registration and removal
  • AuthGuard.onLoginSuccess() and AuthGuard.onLogout() lifecycle hooks
4
likes
140
points
83
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Automatically handles 401/403 responses in Dio — cancels all in-flight requests and navigates to a custom unauthenticated screen. Router-agnostic.

Repository (GitHub)
View/report issues

Topics

#dio #authentication #network #interceptor #flutter

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on dio_auth_guard