diff --git a/src/Actions/RedirectIfTwoFactorAuthenticatable.php b/src/Actions/RedirectIfTwoFactorAuthenticatable.php index 276e7f7e..446b6076 100644 --- a/src/Actions/RedirectIfTwoFactorAuthenticatable.php +++ b/src/Actions/RedirectIfTwoFactorAuthenticatable.php @@ -66,7 +66,7 @@ public function handle($request, $next) protected function validateCredentials($request) { if (Fortify::$authenticateUsingCallback) { - return tap(call_user_func(Fortify::$authenticateUsingCallback, $request), function ($user) { + return tap(call_user_func(Fortify::$authenticateUsingCallback, $request), function ($user) use ($request) { if (! $user) { $this->throwFailedAuthenticationException($request); }