I'd like to protect a register page from automatic submitions, so I decided to try reCaptcha v3. It's an Angular application, and I'm using ng-recaptcha module for easier integration. I've set up a basic example on Stackblitz so you can test it online:
https://stackblitz.com/edit/angular-qk3jhr
I have a couple of doubts/problems:
- If I write my valid Google key into the
app.module.ts
file, when I press the submit button, thethis.recaptchaV3Service.execute
call does nothing. Is it because the app is not in the domain I stated when generating reCaptcha V3 keys? Also, if I write a wrong key, Google complains with the following error:
Error: Invalid site key or not loaded in api.js:
- Once I'd get the token, what do i do with it? I've read the ng-recaptcha documentation but I don't see anything about it. I mean, when I have the token, what do I need to do to check if it's valid and send the form?
Thanks in advance,