shimana's avatar

Repeat execution of the code in Fortify::authenticateUsing()

I am using this code in FortifyServiceProvider:

Fortify::authenticateUsing(function (Request $request) {
    $user = User::where('mobile', $request->mobile)->first();
    if ($user && Hash::check($request->password, $user->password)) {
        Log::info('User logged in.', ['user_id' => $user->id, 'email' => $user->email]);
        return $user;
    }
});

After each login, the log is recorded twice. Is this normal?

laravel log :

[2024-09-27 10:43:09] local.INFO: User logged in. {"user_id":2,"email":"[email protected]"} 
[2024-09-27 10:43:09] local.INFO: User logged in. {"user_id":2,"email":"[email protected]"}

0 likes
0 replies

Please or to participate in this conversation.