I'm having an issue now after installing laravel-math-captcha though it was working fine for 2 days with Laravel 5.7 when I login with correct credentials I get redirected to a 404 page. I debug the login process
die($this->sendLoginResponse($request));
and I get
HTTP/1.0 302 Found Cache-Control: no-cache, private Date: Wed, 10 Oct 2018 13:01:35 GMT Location: http://127.0.0.1:9500/404 Redirecting to http://127.0.0.1:9500/404.
When I navigate to /home I find that I successfully logged in
Any idea how to solve this issue and why did it appear?
[Update]
LoginController
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
public $decayMinutes = 1;
public $maxAttempts = 10;
use AuthenticatesUsers;
protected $redirectTo = '/';
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
}
Login function from AuthenticatesUsers
public function login(Request $request)
{
$this->validateLogin($request);
if ($this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
return $this->sendLockoutResponse($request);
}
if ($this->attemptLogin($request)) {
return $this->sendLoginResponse($request);
}
$this->incrementLoginAttempts($request);
return $this->sendFailedLoginResponse($request);
}