Answer the question
In order to leave comments, you need to log in
How to fix request error when using nuxt/auth?
Hello, there is an application on nuxt
(online store)
I made a shopping cart (vuex) there, it's time to fasten authorization and registration,
googled such a module https://auth.nuxtjs.org/
chose the refresh scheme and set up nuxt.config according to the documentation
before connecting this there was no error component
now I get an error on the request the
request is inside the action store, which is responsible for the shopping cart
async fetch({commit, getters}) {
const res = await this.$axios.$get(
'/rest/cart/get/',
{
progress: false,
headers: {'cart-uuid': getters.getUuid}
})
commit('setCart', res);
},
Error in fetch(): TypeError: Cannot read properties of undefined (reading 'Authorization')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question