Skip to content

Instantly share code, notes, and snippets.

View andreoav's full-sized avatar
📚
Coding awesome things!

Andreo Vieira andreoav

📚
Coding awesome things!
View GitHub Profile
@andreoav
andreoav / axios-interceptors-refresh-token.js
Created August 26, 2019 10:59 — forked from mkjiau/axios-interceptors-refresh-token.js
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 => {