What is this yIXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi - that is not a bcrypt Hash (they begin $2y$ as their identifier?
Jan 9, 2022
6
Level 17
The provided credentials do not match our records.
I have an manual authentication in an Inertia app. Below is the Login method
public function login(Request $request)
{
$credentials = $request->validate([
'email' => ['required', 'email'],
'password' => ['required'],
]);
// dd($credentials); // working fine till here and credentials are correct as per from frontend
if (Auth::attempt($credentials)) {
$request->session()->regenerate();
return redirect('/users');
}
return back()->withErrors([
'email' => 'The provided credentials do not match our records.',
]);
}
The data was populated from User seeder below is the User factory I have been using
public function definition()
{
return [
'name' => $this->faker->name(),
'email' => $this->faker->unique()->safeEmail(),
'organization' => $this->faker->company(),
'phone' => $this->faker->phoneNumber(),
'description' => $this->faker->text(),
'email_verified_at' => now(),
// 'password' => 'yIXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'password' => Hash::make('password'), // password
'remember_token' => Str::random(10),
];
}
Please let me know what could be the problem?
Level 104
@adityakunhare do you have a mutator in your User model that is also hashes the password attribute?
1 like
Please or to participate in this conversation.