Skip to content

Instantly share code, notes, and snippets.

View urmil22's full-sized avatar
💻
Exploring the frontiers of tech

Urmil Bhavsar urmil22

💻
Exploring the frontiers of tech
View GitHub Profile
@mkjiau
mkjiau / axios-interceptors-refresh-token.js
Last active October 5, 2024 12:38
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {