Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/broadcasting/auth 403 forbbiden #38

Open
ArmChaCib opened this issue Dec 21, 2020 · 3 comments
Open

/broadcasting/auth 403 forbbiden #38

ArmChaCib opened this issue Dec 21, 2020 · 3 comments

Comments

@ArmChaCib
Copy link

I am getting a 403 in the broadcasting/ auth api. I already followed the steps but it keeps throwing me the error

@Delaney
Copy link

Delaney commented Apr 15, 2021

Same here, tried all that I can

@withoutfanfare
Copy link

Does this help? Try adjusting your Broadcast::routes definition.

app/Providers/BroadcastServiceProvider.php

class BroadcastServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // Broadcast::routes();
        Broadcast::routes(['middleware' => [
          'api',
          'auth:api',
        ]]);

        require base_path('routes/channels.php');
    }
}

@arufonsekun
Copy link

Does this help? Try adjusting your Broadcast::routes definition.

app/Providers/BroadcastServiceProvider.php

class BroadcastServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        // Broadcast::routes();
        Broadcast::routes(['middleware' => [
          'api',
          'auth:api',
        ]]);

        require base_path('routes/channels.php');
    }
}

It solved to me, thank you!! Just for the records what I've done was using

Broadcast::routes(['middleware' => ['api']]);

instead of

Broadcast::routes();

on BroadcastServiceProvider. Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants