Multi-auth and broadcast
Hello,
I am currently working on a project using Filament 3 and have encountered an issue with broadcasting, particularly in the context of a multi-authentication (multi-auth) setup.
In my application, I have two types of users: 'user' and 'customer', each with their own authentication guards. The broadcasting feature works fine for 'user' type accounts, but I am facing difficulties enabling it for 'customer' type accounts.
Here is a brief overview of my current setup:
1. Broadcasting Configuration: I have configured Laravel Echo and Pusher in my
filament.php
configuration file. The relevant settings are as follows:
```php
'broadcasting' => [
'echo' => [
'broadcaster' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'cluster' => env('PUSHER_APP_CLUSTER'),
'wsHost' => env('PUSHER_HOST'),
'wsPort' => env('PUSHER_PORT'),
'wssPort' => env('PUSHER_PORT'),
'authEndpoint' => '/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
],
],
Issue: The route /broadcasting/auth is only accessible to users authenticated as 'user'. Customers, who are authenticated using a different guard, cannot access this route and therefore do not receive broadcasts.
Attempts to Resolve: I have tried customizing the BroadcastServiceProvider and the authentication logic in the BroadcastController to accommodate both 'user' and 'customer' types but without success.
Given this context, I'm seeking guidance or suggestions on how to properly configure broadcasting in Filament 3 for a multi-auth system. Is there a specific approach or configuration that I'm missing? Any advice or insights would be greatly appreciated.
Thank you in advance for your help!
Best regards,0 Replies