title: Integrating laravel sanctum with nuxt js
body: <p>I am trying to build a <code>nuxt (v2.14)</code> app where i am using the <code>@nuxtjs/auth-next</code> package for authentication.
  I followed the documentation and was successful in integration with <code>laravel-sanctum</code>. Now I get appropriate response when auth package calls <code>/api/user</code>. While calling the other api's through <code>axios</code> I'm getting 419 error</p>
  <blockquote>
  <p>CORS token mismatch</p>
  </blockquote>
  <p>My code:</p>
  <pre><code>fetchData(){
      var url = 'http://localhost:8000/api/project/search';
  
      this.$axios.$post(url, this.selectedFields).then(response =&gt; {
       if(response.status === 200)
       {
  
       }
      })
  }
  </code></pre>
  <p>Do I need to configure XSRF-TOKEN in axios headers?, as its the same package being used in authentication.</p>
  <p><a href="https://i.stack.imgur.com/pADCW.png" rel="nofollow noreferrer">Console screenshot</a></p>
  <p><a href="https://i.stack.imgur.com/p4feb.png" rel="nofollow noreferrer">Network screenshot</a></p>
  <p><code>nuxt.config.js</code></p>
  <pre><code>export default {
    head: {
      title: 'App',
      htmlAttrs: {
        lang: 'en'
      },
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        { hid: 'description', name: 'description', content: '' }
      ],
      link: [
        { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
      ]
    },
    components: true,
  
    buildModules: [
      '@nuxtjs/tailwindcss',
    ],
  
    modules: [
      '@nuxtjs/axios',
      '@nuxtjs/auth-next'
    ],
  
    router: {
      middleware: ['auth']
    },
  
    auth:{
      strategies: {
        'laravelSanctum': {
          provider: 'laravel/sanctum',
          url: 'http://localhost:8000',
          endpoints: {
            login: {
              url: '/api/login',
              method: 'post'
            },
          }
        },
      },
    },
  }
  
  </code></pre>