I found a solution, I hope that will help someone in the future.
Well it is a bug in the library itself, where they delete the session key without checking the result:
public function check($value)
{
if ( ! $this->session->has('captcha'))
{
return false;
}
$key = $this->session->get('captcha.key');
$sensitive = $this->session->get('captcha.sensitive');
if ( ! $sensitive)
{
$value = $this->str->lower($value);
}
$this->session->remove('captcha');
return $this->hasher->check($value, $key);
}
So my solution is like that (you need to extend the class, override the method and bind the class to the new implementation):
public function check($value)
{
if ( ! $this->session->has('captcha'))
{
return false;
}
$key = $this->session->get('captcha.key');
$sensitive = $this->session->get('captcha.sensitive');
if ( ! $sensitive)
{
$value = $this->str->lower($value);
}
$isNotARobot = $this->hasher->check($value, $key);dd($isNotARobot);
if ($isNotARobot) {
$this->session->remove('captcha');
}
return $isNotARobot;
}