title: Laravel Echo Authentication for both normal Web and API middleware
body: <p>I have a Laravel application build with <code>Laravel Echo</code> with private channels via Pusher. This is working, because I authenticate my users via the normal way (no API-tokens).</p>
  
  <p>Then I have a NuxtJS application, with authentication via a Bearer-token. So for that application I use the following code:</p>
  
  <pre><code>window.Echo = new Echo({
    broadcaster: "pusher",
    key: "1234567",
    forceTLS: true,
    authEndpoint: "https://mywebsite.com/broadcasting/auth",
    auth: {
      headers: {
        Authorization: "Bearer " + "foobar",
        Accept: "application/json",
      },
    },
  });
  </code></pre>
  
  <p>The problem is, that I cannot authenticate my Users in the NuxtJS app.. because it uses a different way to Authenticate them.</p>
  
  <p>In the <code>BroadcastServiceProvider</code> of the Laravel application, I have this <code>Broadcast::routes();</code>. This is the way it works in the Laravel Application.</p>
  
  <p>When I change it to this: <code>Broadcast::routes(['middleware' =&gt; ['auth:api', 'auth']]);</code>.. it works in the NuxtJS application, but NOT in the Laravel application anymore.</p>
  
  <p>Is there a way I can authenticate my broadcasting endpoint on both the regular authentication way as the bearer-token way?</p>