laravel-google-recaptcha-v3
laravel-google-recaptcha-v3 copied to clipboard
Error: The action is timeout.
Hello, I have a problem with this error.
I checked every issue here and all of them are timeouts after 2 minutes of page loading, but for me, the problem occurs after page load < 2 minutes. More precisely seconds after js load and submit.
Laravel 8, PHP 7.3.7 My controller:
class ReservationController extends Controller
{
public function createReservation(Request $request){
// Here validation fails with timeout message
$request->validate([
'room' => 'required|exists:rooms,id',
'email' => 'required|email',
'phone' => 'required|max:128',
'dateReservation' => ['required', new DateInPastCheck, new DateArrivalLeaveCheck],
'name' => 'required|string|min:3|max:150',
'g-recaptcha-response' => [new GoogleReCaptchaV3ValidationRule('order')],
]);
// ...
}
}
But when I test before request validation everything passes normally.
class ReservationController extends Controller
{
public function createReservation(Request $request){
dd(GoogleReCaptchaV3::verifyResponse(
$request->input('g-recaptcha-response'),
$request->getClientIp()
)
->getMessage());
// ....
}
}
I got the same issue. Can I know if someone has solution ?
Need to run this.$refs.captcha.execute(); after the response (success or error) otherwise you are submitting the same token.
I got the same issue.
Is there anyway to solve this problem with javascript instead of vue ?
I have tried
<script type="text/javascript">
setInterval(function () {
refreshReCaptchaV3('sign_in_id', 'sign_in');
}, 120000);
</script>
but this still happen