Module always adds Authorization header #1512
Unanswered
aaronsnig501
asked this question in
Q&A
Replies: 1 comment
-
I was using |
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
Uh oh!
There was an error while loading. Please reload this page.
-
If I add
tokenRequired: true
to the config it will always try to send a token, even if there is none this will result in a 401 error from the backend as it will receiveAuthorization: Token undefined
. This breaks endpoints that don't require authorization.If I change this to
tokenRequired: false
, it never sends a token, which breaks endpoints that do require a token. Even if I try to call this with axios and set the axios header manually, this module overrides it.I found documentation that said I configure the tokens to not be global but there's no explanation of how I can set a component to require a token or not.
Because of this behavior, I cannot make axios calls (even if I manually set the header) because nuxt-auth overrides all of my API calls.
Is there anyway that I can configure this to properly allow for protected and public endpoints?
Beta Was this translation helpful? Give feedback.
All reactions