Level 63
Presence channels need the user to be authenticated, so guest users join a presence channel.
Why do you need to let guest users join a presence channel ?
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How do I allow guest user, join in Laravel Reverb Presence Channel?
It seems like I can't override the '/broadcasting/auth' route.
I tried overriding it using a middleware, but it doesn't work.
// api.php
Route::post('/broadcasting/auth', function (Request $request) {
if (Auth::check) {
return Broadcast::auth($request);
}
return response()->json(['message' => 'Unauthorized'], 403);
})->middleware('authenticateGuest');
// AuthenticateGuest Middleware
public function handle(Request $request, Closure $next): Response
{
if (! Auth::check()) {
$user = User::factory(1)->make();
Auth::login($user);
}
return $next($request);
}
Please or to participate in this conversation.