Update axios-auth-refresh

This commit is contained in:
Kasper Seweryn 2022-02-24 11:51:08 +01:00
parent 7fb82c5785
commit 43f609b497
No known key found for this signature in database
GPG Key ID: B2BA6FA597595C00
4 changed files with 6 additions and 16 deletions

View File

@ -17,7 +17,7 @@
},
"dependencies": {
"axios": "0.26.0",
"axios-auth-refresh": "2.2.8",
"axios-auth-refresh": "^3.2.2",
"diff": "5.0.0",
"django-channels": "2.1.3",
"focus-trap": "6.7.3",

View File

@ -13,7 +13,7 @@ import store from './store'
import GetTextPlugin from 'vue-gettext'
import { sync } from 'vuex-router-sync'
import locales from '@/locales'
import axiosAuthRefresh from 'axios-auth-refresh'
import createAuthRefreshInterceptor from 'axios-auth-refresh'
import filters from '@/filters' // eslint-disable-line
import { parseAPIErrors } from '@/utils'
@ -158,13 +158,6 @@ const refreshAuth = (failedRequest) => {
}
}
// TODO: This seems like a vite error, in production it thinks that
// axiosAuthRefresh is a following object: { default () { /* ... */} }
// Maybe we need to tweak the config?
const createAuthRefreshInterceptor = import.meta.env.DEV
? axiosAuthRefresh
: axiosAuthRefresh.default
createAuthRefreshInterceptor(axios, refreshAuth)
store.dispatch('instance/fetchFrontSettings').finally(() => {

View File

@ -26,9 +26,6 @@ export default defineConfig({
}
}
],
build: {
transformMixedEsModules: true
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),

View File

@ -724,10 +724,10 @@ autoprefixer@^10.4.2:
picocolors "^1.0.0"
postcss-value-parser "^4.2.0"
axios-auth-refresh@2.2.8:
version "2.2.8"
resolved "https://registry.yarnpkg.com/axios-auth-refresh/-/axios-auth-refresh-2.2.8.tgz#de420b6b5d6efdb4ad3666e44c38960a9b08f382"
integrity sha512-WR59uCgO9VppC9VQU6vtszrAHnF3RtylkGltOGldfB4Rw+my0j9WdJuvRzMwiwTh+LmG/SQWzgeCfFYf8N4FIA==
axios-auth-refresh@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/axios-auth-refresh/-/axios-auth-refresh-3.2.2.tgz#e3ef505932d33318c74c2ffce04c0fdc9767ffe0"
integrity sha512-Ocu8leYhuhNejH/RBC0tWpUuv0cOplvdwltIQuYmkhihbZ8AqR0qPIZs+fV5V3JL6L5IM4Y5rjHgXyQWozjM7g==
axios@0.26.0:
version "0.26.0"