fresh_dio

Last updated:

0 purchases

fresh_dio Image
fresh_dio Images
Add to Cart

Description:

fresh dio

fresh_dio 🍋 #





A dio interceptor for built-in token refresh. Built to be used with fresh.
Overview #
fresh_dio is a dio interceptor which attempts to simplify custom API authentication by integrating token refresh and caching transparently. fresh_dio is flexible and is intended to support custom token refresh mechanisms.
Usage #
dio.interceptors.add(
Fresh.oAuth2(
tokenStorage: InMemoryTokenStorage<OAuth2Token>(),
refreshToken: (token, client) {
// Perform refresh and return new token
},
),
);
copied to clipboard
Example #
See the example for a complete sample application using fresh_dio which integrates with jsonplaceholder.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.