From b8a35be095d63d43d0fc80d442ae77bbaf9b0629 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 3 Nov 2024 16:14:25 +0100 Subject: [PATCH] fix: always authenticate with lowercase emails --- app/Providers/FortifyServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index b916b62340..e8784bab3c 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -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)