anhskohbo / no-captcha

No CAPTCHA reCAPTCHA For Laravel.
https://packagist.org/packages/anhskohbo/no-captcha
MIT License
1.78k stars 234 forks source link

Allow verifying multiple times. #91

Closed mmghv closed 6 years ago

mmghv commented 7 years ago

Fixes #45 Fixes #38

Google API will only verify a response one time .. if you call it the second time with the same response it will return timeout-or-duplicate error.

Each reCAPTCHA user response token should be used only once. If a verification attempt has been made with a particular token, it cannot be used again.

--> Verifying the user's response

So to allow validating the Captcha and calling verifyResponse() multiple times, we cache the verified responses.