
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
angular1-recaptcha
Advanced tools
AngularJS 1.x directive that provides support for Google's ReCaptcha v2 Checkbox validation.
npm install --save angular1-recaptcha
angular
.module('app', [
// ...
require('angular1-recaptcha')
])
.constant('RECAPTCHA_SITE_KEY', "YOUR-SITE-KEY") // this step is optional
// if you provide later in your template
<recaptcha ng-model="ctrl.recaptcha"></recaptcha>
You can optionally provide data-theme="dark" (the default is light) or data-site-key="YOUR-SITE-KEY" (the default is the one you provided as a constant on Step 1).
ng-model is where the token received from the recaptcha library is stored. You can set it to null to reset the recaptcha, or you can put ng-disabled="!ctrl.recaptcha" on your button to prevent the form beign submitted without a valid captcha token.
You do not have to include Google's Recaptcha script. This library includes asynchronous & deffered way to include it if the library itself is not found. Multiple instances of the directive does not lead to recaptcha library is beign included twice.
Please see the Google's documentation about the validation that needs to be occur in the server-side.
FAQs
AngularJS Recaptcha Directive
We found that angular1-recaptcha demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.