title: Pusher with Vue and Laravel API not working
body: <p>I am using Vue SPA and Laravel. I have google it for hours and tried many things but I can't find a way to make it work.</p>
  
  <p>In <code>index.html</code> I have</p>
  
  <pre><code>&lt;meta name="csrf-token" content="{{ csrf_token() }}"&gt; 
  </code></pre>
  
  <p>This is my subscribe method:</p>
  
  <pre><code>subscribe() {
    let pusher = new Pusher('key', {
      cluster: 'ap1',
      encrypted: true,
      authEndpoint: 'https://api_url/broadcasting/auth',
      auth: {
        headers: {
          'X-CSRF-Token': document.head.querySelector(
            'meta[name="csrf-token"]'
          )
        }
      }
    })
    let channel = pusher.subscribe(
      'private-user.login.' + this.user.company_id
    )
    channel.bind('UserLogin', data =&gt; {
      console.log(data)
    })
  }
  </code></pre>
  
  <p>I am getting a 419 error saying: "<em>expired due to inactivity. Please refresh and try again.</em>"</p>
  
  <p>If you didn't noticed there I am trying to listen to a private channel.</p>