Does google recaptcha 3 display anything on frontend in case of failure

44 Views Asked by At

As I understood (and have implemented in my project), google recaptcha 3 requires exchanging site_key for a token on frontend side. Then frontend sends that token to backend, and backend sends that token to this endpoint: https://www.google.com/recaptcha/api/siteverify In case that endpoint returns a success, backend continues processing. If it's a failure, backend returns an error to frontend and stops, and that way no malicious request gets to the server.

But I would like recaptcha 3, in case of failure, to display its badge / card on my frontend form, that says like "Invalid captcha". Can recaptcha 3 do this?

I tried to trigger captcha failure on frontend, using various tricks with request headers and proxied browsing, but nothing seems to work

0

There are 0 best solutions below