R
R
Romi2021-10-01 21:29:28
Laravel
Romi, 2021-10-01 21:29:28

I added my Guard to the AuthServiceProvider using Auth::viaRequest - so now it drives ALL requests through it - is this normal?

I did everything in accordance with

https://docs.rularavel.com/docs/8.x/authentication... it

works, but the problem is that it now passes ALL requests through this closure, even for routes that I did not specify use security middleware('auth')

Is that ok? Or did something go wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Romi, 2021-10-01
@romicohen

Changed back in config/auth.php to

'defaults' => [
        'guard' => 'web',
        'passwords' => 'users',
    ],

seems to have solved the problem, but it's still not clear...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question