{"repo":"felangel/fresh","free":true,"listed":false,"github":"https://github.com/felangel/fresh","clone":"git clone https://github.com/felangel/fresh.git","description":"🍋 A token refresh library for Dart.","language":"Dart","stars":428,"topics":["dart","dartlang","dart-package","dart-library","http","oauth","oauth2","token-refresh","dio","interceptor"],"license":null,"category":"auth-billing-email","readme_excerpt":"Fresh 🍋 --- A collection of packages for automatic token refresh in Dart and Flutter. Fresh handles refreshing, caching, and attaching authentication tokens transparently so your API calls just work. Why Fresh? Token-based authentication seems simple until you handle the edge cases: tokens expire mid-session, multiple requests fail at the same time triggering duplicate refreshes, refresh tokens get revoked, and you need to route users to login when auth is lost. Fresh handles all of this so you don't have to. - No more manual 401 handling scattered across your codebase - No more race conditions when concurrent requests trigger simultaneous refreshes - No more stale tokens causing request failures - expired tokens are refreshed proactively before the request is even sent Packages Package Pub ------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------- fresh fresh dio fresh graphql fresh http Features - Automatic token refresh on 401 / auth errors, with automatic request retry - Proactive refresh before requests when the token is expired - Single-flight refresh - concurrent requests share one refresh call instead of triggering multiple - authenticationStatus stream for reacting to login/logout events - Pluggable TokenStorage - bring your own persistence layer - Built-in OAuth2Token with expiresAt support Usage fresh dio See the fresh dio README for ","default_branch":null,"files":null,"tree":[],"storefront":"/r/felangel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/felangel/fresh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}