From cc140f099c4c2a1d97b9f69ee315b37af3d2672c Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Thu, 10 Sep 2020 14:59:14 -0400 Subject: [PATCH] Pass request through to the callback --- src/Actions/RedirectIfTwoFactorAuthenticatable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }