Skip to content

Commit

Permalink
fix: always authenticate with lowercase emails
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Nov 3, 2024
1 parent d3f422a commit b8a35be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Providers/FortifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ public function boot(): void
});

Fortify::authenticateUsing(function (Request $request) {
$user = User::where('email', $request->email)->with('teams')->first();
$email = strtolower($request->email);
$user = User::where('email', $email)->with('teams')->first();
if (
$user &&
Hash::check($request->password, $user->password)
Expand Down

0 comments on commit b8a35be

Please sign in to comment.