Axios interceptor not working on the user endpoint #1487
Unanswered
iamsayantan
asked this question in
Support Requests
Replies: 2 comments
-
Hello!! |
Beta Was this translation helpful? Give feedback.
0 replies
-
We don't have time to set up and debug the exact setup described here; it would literally take me hours just to arrive at a point where I could begin to investigate this issue on my own. Therefore, your own investigation is needed. If you have this reproduced, please track down what, if any, the bug is within the auth module. Specific logic & lines of code with well-reasoned explanations for why they're wrong are most helpful. Until we have this, I cannot realistically act on this report. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Version
module: 4.9.1
nuxt: 2.13.0
Nuxt configuration
mode:
Nuxt configuration
Reproduction
Steps to reproduce
I have axios request interceptor registered that adds one header into every request, this header is required for all the requets.
But this header is not being set for the user endpoint when the page is reloaded. It works when user is logging in. Meaning when the user endpoint is triggered after running
this.$auth.loginWith('local', { data: payload })
, the header is being set and it works fine. But when I reload after log in, the subsiquent user endpoint trigger (bymounted()
hook in theAuth
library) is not adding the header in the request.What is expected?
I expect the header token to be added in the request.
What is actually happening?
The header token is not being set and the api endpoint is returning error.
Beta Was this translation helpful? Give feedback.
All reactions