Answer the question
In order to leave comments, you need to log in
Auth::attempt requires me to specify a password - how to get rid of this?
Hello.
I am doing custom authentication for Laravel now. I don't need a password, only 'name'.
But when I try to authenticate via Auth::attempt, it tells me that I need a password.
I tried to pass an empty password (null as in the database) - does not help - Auth::attempt returns false without comments.
And in general, I would like to do it without crutches like empty passwords in logic.
Googled. I tried to make my own provider - it doesn't work.
How can I get rid of the password check in Auth::attempt?
Thank you.
Answer the question
In order to leave comments, you need to log in
Because you haven't dealt with the guards and user providers, as I advised you in the last question.
How can I get rid of the password check in Auth::attempt?Create your own user provider.
attempt
he does nothing himself, he passes an array of data (login / password / token / full name / whatever) the user to the provider, who already knows what to do with it and how to check it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question