Im currently working on implementing chat into our application - Im using Laravel-echo together with Pusher. I have SPA and use JWT authentication via API endpoint.
The authentication is working, but when the user is authenticated on the top level, no individual channel authentication is done. So any and every authenticated users can subscribe to every chat channel and recieve their messages š
As you can see i have added a custom endpoint for authentication from my API. This is working and im getting a response from my custom authentication with the h256 string plus some user information as i would want to use presence channels.
How can I set up that further authentication is needed e.g. with BroadcastServiceProvider > Broadcast::routes(['middleware' => 'auth:api']) ?
Is it perhaps possible to do custom connection to a channel and specify another auth endpoint ? Because at the moment I am able to completely disable the BroadcastServiceProvider in the Backend and im still authenticated via the api/broadcasting/auth endpoint, and then able to subscribe to all channels as I please.
Hi all.
Im currently working on implementing chat into our application - Im using Laravel-echo together with Pusher. I have SPA and use JWT authentication via API endpoint.
The authentication is working, but when the user is authenticated on the top level, no individual channel authentication is done. So any and every authenticated users can subscribe to every chat channel and recieve their messages š
As you can see i have added a custom endpoint for authentication from my API. This is working and im getting a response from my custom authentication with the h256 string plus some user information as i would want to use presence channels.
How can I set up that further authentication is needed e.g. with BroadcastServiceProvider > Broadcast::routes(['middleware' => 'auth:api']) ? Is it perhaps possible to do custom connection to a channel and specify another auth endpoint ? Because at the moment I am able to completely disable the BroadcastServiceProvider in the Backend and im still authenticated via the api/broadcasting/auth endpoint, and then able to subscribe to all channels as I please.