samedi 28 septembre 2019

Laravel 5.8 Auth::attempt function not working

I'm building a laravel app and login suddenly stopped working. The failure appears to be on the attempt function. I don't know what the problem is since the credentials are being passed accurately as they are on the database.

Here is a dump of the function on the AuthenticatesUsers class

protected function attemptLogin(Request $request)
{
    dd($this->guard()->attempt(
        $this->credentials($request), $request->filled('remember')
    ));
}

Result: false

Here is a dump of the output to the Attempting class

public function __construct($guard, $credentials, $remember)
{

    $this->guard = $guard;
    $this->remember = $remember;
    $this->credentials = $credentials;


    dd($this->guard,$this->credentials,$this->remember,);
}

Result:

"web"
array:2 [▼
  "email" => "johnmarkwachira@gmail.com"
  "password" => "password"
]
true


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire