Open deepslam opened 5 years ago
We've had a lot of trouble with that approach, so the better approach I would recommend is just to use your own custom basic auth middleware. Fortunately basic auth is incredibly easy to implement, so just create a new middleware in your App\ and any route you want to have it, add it as the middlware (making sure not to mix and match with api.auth middleware).
Hi everyone!
I'm sorry for this popular question but I can't configure basic auth for my API. I've putted this code into by AppServiceProvider:
But I got 401 message that client couldn't be authorized. At the same time, I'm authorized in my admin panel via cookie and laravel session. I also send X-CSRF-TOKEN in my headers but I still get 401 error.
Help me, please. I think I have a misunderstanding with some basic knowledge.
Sincerely, Dmitry