Hi.
I've spent several hours to understand why my axios default config (added in ~/plugins/axios.js as explained here) were not applied when fetchUser was called, at the app init.
In fact, you add the auth plugin just after the first axios plugin, so it inits before the config file:
|
const index = this.options.plugins.findIndex(p => |
|
/axios\.js$/.test(p.src || p) |
|
) |
|
this.options.plugins.splice(index + 1, 0, join(this.options.buildDir, dst)) |
With that, I can't use this module at all, because all the axios config I need (especially x-api-key header) is set after the auth plugin.
😞
Do you have any quick solution, or do you want a PR?
Hi.
I've spent several hours to understand why my axios default config (added in
~/plugins/axios.jsas explained here) were not applied whenfetchUserwas called, at the app init.In fact, you add the auth plugin just after the first axios plugin, so it inits before the config file:
auth-module/lib/module.js
Lines 93 to 96 in ca8785f
With that, I can't use this module at all, because all the axios config I need (especially x-api-key header) is set after the auth plugin.
😞
Do you have any quick solution, or do you want a PR?