[Vuejs]-Nuxt-auth ..login network header gives me strange path seems like my locale route for login page

0๐Ÿ‘

โœ…

Iโ€™m not sure, I used the exact same configurations and it worked for me.
But your nuxt.config.js file has a missing closing }, for the axios object.

it should look like this:

  axios: {
    baseURL: "http://aqar.abdullah.link/api"
  },
  auth: {
    strategies: {
      local: {
        endpoints: {
          login: {
            url: "/office/login",
            method: "post",
            propertyName: "data.token"
          },
          user: { url: "/auth/me", method: "post", propertyName: false },
          logout: false
        }
      }
    }
  },

also make sure you have these modules in you nuxt.config.js as well:

  modules: [
    "@nuxt/http",
    "@nuxtjs/auth",
    "@nuxtjs/axios",
  ],

Leave a comment