VividCortex / angular-recaptcha

AngularJS directive to add a reCaptcha widget to your form
http://vividcortex.github.io/angular-recaptcha/
MIT License
496 stars 257 forks source link

Use of `recaptcha.net` to load captcha library to support it in china. #237

Open shuklajay117 opened 6 years ago

shuklajay117 commented 6 years ago

I'm using this component in my directive and I see it is loading re-captcha google library from google.com domain. As google is blocked in china, its not working. However there's way to overcome this problem and we can load required library from another domain i.e. www.recaptcha.net as per google developers forum.

Ref - https://developers.google.com/recaptcha/docs/faq

Please have a look at question Can I use reCAPTCHA globally? in above link.

TheSharpieOne commented 5 years ago

Both of these places explicitly check for the google domain, we should probably make the domain configurable and just default to the google domain (to avoid a breaking change) https://github.com/VividCortex/angular-recaptcha/blob/73d01e431d07f2fc9b84c5e62677e8ed5b41a377/src/service.js#L149 https://github.com/VividCortex/angular-recaptcha/blob/73d01e431d07f2fc9b84c5e62677e8ed5b41a377/src/service.js#L162