I have applied the default Basic Auth middleware to one of my routes. Everything seems to be working perfectly (I also changed the default field from email to login because that's what I am using as the username) except for the fact that I am able to authenticate any user just by his login. I do not need to specify the password. Whenever I try to type in the correct password Laravel doesn't let me through. It correctly recognizes that a user does not exist if I input a non-existing username but it also allows me to authenticate if I specify a correct login only (without a password).
Laravel 5.5 Basic Auth Problem - Laravel authenticates users without a password
I have applied the default Basic Auth middleware to one of my routes. Everything seems to be working perfectly (I also changed the default field from
email
tologin
because that's what I am using as the username) except for the fact that I am able to authenticate any user just by his login. I do not need to specify the password. Whenever I try to type in the correct password Laravel doesn't let me through. It correctly recognizes that a user does not exist if I input a non-existing username but it also allows me to authenticate if I specify a correct login only (without a password).This is my
api.php
route:The only change I made in the
AuthenticateWithBasicAuth
class is specifying thelogin
field instead of the defaultemail
field:I'd be really grateful for any help with this issue.