Closed webmclink closed 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
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
The 'auth:sanctum'
did the trick. Thanks @Chris1234567899 and @romanzipp
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