romanzipp / Laravel-Queue-Monitor

Monitoring Laravel Jobs with your Database
https://packagist.org/packages/romanzipp/laravel-queue-monitor
MIT License
698 stars 92 forks source link

ui route access #120

Closed webmclink closed 1 year ago

webmclink commented 1 year ago

The UI route middleware is not working, I tried to add 'auth' middleware but it redirect me back to the previous page. Is there any setting need to do? Thank you

romanzipp commented 1 year ago

I believe only adding the auth middleware won't work since the middleware responsible for parsing cookies and starting the session in the first place are missing. Could you try adding the web middleware group instead? (if you have configured it that way)

See https://github.com/laravel/laravel/blob/10.x/app/Http/Kernel.php#L32

Chris1234567899 commented 1 year ago

In my case (using sanctum and jetstream, I put: 'route' => [ 'prefix' => 'jobs', 'middleware'=> ['web','auth:sanctum', config('jetstream.auth_session'), 'verified'] ],

That seems to do the trick

webmclink commented 1 year ago

The 'auth:sanctum' did the trick. Thanks @Chris1234567899 and @romanzipp