Using Laravel echo, pusher and vuejs.
Whenever I try to join a private channel(the channel of the own user) y get this error
"Pusher : Couldn't retrieve authentication info. 419Clients must be authenticated to join private or presence channels. See: https://pusher.com/docs/authenticating_users"
Here is the moment I join a the channel:
Echo.private('App.User.' + response.data.currentUser)
.listen('Event',(e)=>{});
response.data.currentUser
does contain correctly the id of the user.
Here is the channel.php
Broadcast::channel('App.User.{id}', function ($user, $id) {
if (Auth::user()->id == (int) $id) {
return ['STATUS' => 'OK'];
} else {
return false;
}
});
How can I solve this