Preparing for system design interviews?  Try bugzed.com →

refresh-fetch

JSON →
library 0.9.0 ·javascript
verified Jun 7, 2026

A wrapper around the fetch API that automatically handles authentication token refreshing. Current stable version is 0.9.0. It intercepts fetch responses, detects token expiry via a configurable `shouldRefreshToken` callback, performs token refresh via a `refreshToken` function, and retries the original request. Unlike manual token management, refresh-fetch abstracts the retry logic and ensures concurrent requests are serialized during token refresh. Requires ES6 Promise and fetch. Suitable for single-page apps using bearer tokens with expiry.

total hits 20
actors 4 distinct systems
last hit 17d ago AhrefsBot
ByteDance
4
GPTBot
3
Amazonbot
3
Humans
9

top countries 🇸🇬 Singapore · 🇺🇸 United States · VN · 🇨🇦 Canada · 🇩🇪 Germany