{"repo":"Eden1711/axios-auth-refresh","free":true,"listed":false,"github":"https://github.com/Eden1711/axios-auth-refresh","clone":"git clone https://github.com/Eden1711/axios-auth-refresh.git","description":"Bulletproof Axios Interceptor for JWT Refresh Token","language":"TypeScript","stars":12,"topics":["authentication","axios","interceptors","jwt","typescript"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Axios Auth Refresh Queue 🛡️ 🚀 Ultra-lightweight ( A bulletproof , zero-config Axios interceptor that handles JWT refresh tokens automatically. It solves the race condition problem when multiple requests fail with 401 Unauthorized simultaneously. License MIT 🚀 Why use this? When your Access Token expires, your app might fire 5 API requests at once. Without this library, all 5 will fail, leading to 5 separate \"Refresh Token\" calls (Race Condition) or forcing the user to logout. Why this library instead of axios-auth-refresh? This library fixes it by: 1. Intercepting the first 401 error. 2. Pausing all other requests in a Queue . 3. Calling the \"Refresh Token\" API once . 4. Retrying all paused requests with the new token. 🌍 Compatibility & Supported Frameworks Since this library is built on top of Axios , it is framework-agnostic and works in any JavaScript/TypeScript environment: Platform Frameworks Status :----------- :-------------------------------------------- :----------------- Frontend React, Vue, Angular, Svelte, Next.js, Nuxt.js ✅ Fully Supported Backend Node.js (Express, NestJS), Deno, Bun ✅ Fully Supported Mobile React Native, Expo, Ionic, Capacitor ✅ Fully Supported Desktop Electron, Tauri ✅ Fully Supported 📦 Installation 🛠️ Usage 1. Basic Setup Just wrap your axios instance with applyAuthTokenInterceptor. 2. Custom Headers (Advanced) If your backend doesn't use Authorization: Bearer or requires specific headers (like x-api-key), you can use attachTokenToReques","default_branch":null,"files":null,"tree":[],"storefront":"/r/Eden1711","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Eden1711/axios-auth-refresh/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."}