I know this is a pretty generic title but after reading all the ones that come up, none of them mention the issue I'm having. Basically, I'm running into issues regarding the use of Auth::attempt()
. I've checked $credentials
to make sure I was using the right password and indeed I was.
This doesn't work -
public function store(Request $request)
{
$credentials = ['email' => $request->email, 'hash' => $request->password];
if (Auth::attempt($credentials)) {
return redirect()->home();
}
}
But retrieving the hashed password from DB and using this works -
if (Hash::check('password123', $hashedPassword)) {
echo "works";
}
Is there a way for me to check what part of Auth::attempt
is causing invalid credentials?