Skip to content

Instantly share code, notes, and snippets.

@ModPhoenix
ModPhoenix / axios-interceptors-refresh-token.js
Last active August 26, 2024 00:24
Axios interceptors token refresh for few async requests. ES6
import axios from "axios";
import { settings } from "../settings";
import { authAPI } from ".";
const request = axios.create({
baseURL: settings.apiV1,
});
request.interceptors.request.use(
(config) => {