VividCortex / angular-recaptcha

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

Get sitekey via http request #246

Closed paulinhps closed 4 years ago

paulinhps commented 4 years ago

Hello!

I would like to make a contribution to the solution. Provide the option to obtain the sitekey via http request. I have already implemented just want authorization and a branch to make a pull request.

Thanks!

Paulo Henrique Santana paulinhps@gmail.com

TheSharpieOne commented 4 years ago

IMHO such a feature should remain in the user's code. As the code currently is, it is possible to perform a network request to load the key and then provide the key directly to the directive. You can conditionally load the directive via ngIf to prevent the directive from running before the key is loaded.

iambrosi commented 4 years ago

I agree 100% with @TheSharpieOne. Loading the site key from an external source is not this library's responsibility.