dio_auth_interceptor 0.1.0
dio_auth_interceptor: ^0.1.0 copied to clipboard
Drop-in Dio & http interceptor for JWT refresh with a tested single-flight queue: concurrent 401s trigger exactly one refresh call, zero boilerplate.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add dio_auth_interceptorWith Flutter:
$ flutter pub add dio_auth_interceptorThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
dio_auth_interceptor: ^0.1.0Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:dio_auth_interceptor/dio_auth_interceptor.dart';