pusher / pusher-http-php

PHP library for interacting with the Pusher Channels HTTP API
https://pusher.com/docs/server_api_guide
1.4k stars 306 forks source link

Unable to subscribe to private channel - gives 403 | Forbidden #348

Closed emuter closed 1 year ago

benw-pusher commented 1 year ago

Can you provide more info here? 403 forbidden would indicate that the auth endpoint you have specified requires some form of authentication that is not present in the request being made. Have you checked the setup of your auth server and configured any necessary headers in the client auth request?

emuter commented 1 year ago

@benw-pusher i did spend sometime to check on this. but went lazy on to record everything i did. however, i am at a conclusion that its not a problem with pusher, but with Laravel PusherBroadcaster.php @ auth function

as i have commented this. //$channelName = $this->normalizeChannelName($request->channel_name);

and gave it directly $channelName = $request->channel_name;

then everything got resolved. i do not quite understand why laravel is replacing 'private-' part with a ' ' to continue with private channel authentication. i'd be glad if someone explained that to me or else that got corrected in consideration of it as a bug or any other flaw.

benw-pusher commented 1 year ago

HI @emuter. I'm not sure why Laravel is doing this, perhaps you could get some support from Laravel as the code that is causing the error is provided by Laravel and not Pusher.