I am implementing recaptcha in Angular JS, I am using "https://github.com/VividCortex/angular-recaptcha" url as reference. I have referred the Usage section and followed the instructions of code but still not able to get recaptcha in registration page.
Steps I have followed - 1. Generated a public key. 2. Added 3. Added div for recaptcha
- Added the anular-recaptcha.js in page - downloded form github code of above url.
Can anyone please let me know what I am missing in it? Can anyone can give me demo example link for recaptcha?
Thanks in advance.
Sorry if you have already checked this...
They have a demo file here.
They also mention ..."Keep in mind that the captcha only works when used from a real domain and with a valid re-captcha key, so this file wont work if you just load it in your browser."
I followed their instructions and it worked okay for me.
A good video demo to include google recaptcha in AngularJS application is given here AngularJS+ Google Recaptcha
It includes
Hope this Demo helps.
example that woked for me
register.cshtml:
app.js:
controller.js:
Controller.cs:
When working with angularjs and google recaptcha, the library you have used is the best option. But you have to take care of the following things for it to work.
This link has a good explaination with a working example. Google recaptcha with angularJS
Step1: Include captcha directive in form.html
Step2: Next is the App.js
The angular-recaptcha library provides us with the vcRecaptchaService that has a getResponse() method, which provides us with g-captcha-response string after the user has successfully solved the captcha.
Step 3: Handle the POST request at api endpoint using SLIM PHP framework