dingo / dingo/api

Middleware doesn't work with Broadcasting?

Open
#1,410 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Trying to setup Broadcasting Authorization, but when I add the auth middleware in the BroadcastServiceProvider as such:

```php
Broadcast::routes([ 'middleware' => [ 'api.auth' ] ]);
```

It's throwing the following exception:

`Call to a member function getAuthenticationProviders() on a non-object`

Tried a few things, but can't get this to work. Any ideas?

Contributor guide

Open the contributing guide

Research direction

Start with the BroadcastServiceProvider and the Broadcast::routes call shown in the report, then reproduce the failure using the api.auth middleware. Trace the getAuthenticationProviders exception and verify that broadcasting authorization works without the reported error when the issue is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
api, authentication, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.