In my web routes I am using Auth::routes();
and in login.blade.php I am using
The network request is throwing a 302 status error, not found
??
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all, I am migrating app to 5.3 and I am experiencing login problem. In my RegisterController I am sending the user a confirmation email token which is generated in the User __ construct. This works fine and verified changes to 1 however when I try to login I am still getting 'These credentials do not match our records' error.
Here is my AuthenticatedUsers trait:
public function login(Request $request)
{
// $this->validateLogin($request);
$this->validate($request, [
'email' => 'required|email',
'password' => 'required'
]);
// attempt to login
if(Auth::attempt($this->getCredentials($request))) {
// flash()->success('Welcome!', 'You may submit your photos here.');
return redirect('/submit');
}
$this->incrementLoginAttempts($request);
return $this->sendFailedLoginResponse($request);
}
protected function getCredentials(Request $request) {
return [
'email' => $request->input('email'),
'password' => $request->input('password'),
'verified' => true
];
}
Can anyone tell me where I'm going wrong please? Thanks
Found it :
In my users controller I was using a mutator to set the pw
public function setPasswordAttribute($password) {
$this->attributes['password'] = bcrypt($password);
}
However I was already doing this in the RegisterController
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'username' => $data['username'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
Please or to participate in this conversation.