Reputation: 1
I created the custom basic auth in laravel. But, whenever I try to authenticate, there's a 400 bad request error. Authorization header comes out well like "basic base_encode64 (username: password)" If I exclude that header, 401 error comes out as I intended from the code I made... If I put in the Authorization header, I can't even access the code I made. But when I try it on phpunit or xdebug, I can authenticate well even if I have an Authorization header. I think an error appears when I try with a docker, but what setting should I change for authenticate?
Upvotes: 0
Views: 224
Reputation: 11
The best way in laravel 8 for the authentication is to use Laravel Fortfify (https://laravel.com/docs/8.x/fortify#introduction). you can just follow the documentation and you have all the logic ready for register new users authentication and logout.
Upvotes: 1