
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
angular-captcha
Advanced tools
BotDetect Captcha Angular Module requires BotDetect Java or PHP Captcha library to generate Captcha challenges. BotDetect ASP.NET (Core) Captcha does not support it yet -- but the support in it is coming soon.
npm install angular-captcha --save
If you use SystemJS, declare the following in your SystemJS config file:
map: {
...
'angular-captcha': 'npm:angular-captcha'
},
packages: {
...
'angular-captcha': {
defaultExtension: 'js',
main: 'index'
},
import { BotDetectCaptchaModule } from 'angular-captcha';
@NgModule({
imports: [
...
BotDetectCaptchaModule.forRoot({
captchaEndpoint: '/botdetect-java-captcha-api-path-at-server-side/botdetectcaptcha'
})
],
...
})
import { BotDetectCaptchaModule } from 'angular-captcha';
@NgModule({
imports: [
...
BotDetectCaptchaModule.forRoot({
captchaEndpoint: '/botdetect-php-captcha-api-path-at-server-side/simple-botdetect.php'
})
],
...
})
<botdetect-captcha styleName="exampleCaptcha"></botdetect-captcha>
export class ExampleComponent {
/**
* BotDetect CAPTCHA component.
*/
@ViewChild(CaptchaComponent) captchaComponent: CaptchaComponent;
/**
* On form submit.
*/
validate(value, valid): void {
this.captchaComponent.validateUnsafe((isCaptchaCodeCorrect: boolean) => {
if (isCaptchaCodeCorrect) {
// Captcha code is correct
} else {
// Captcha code is incorrect
}
});
}
}
OR
<input
type="text"
id="captchaCode"
name="captchaCode"
#captchaCode="ngModel"
ngModel
correctCaptcha
>
These client-side captcha validations are just an UI usability improvement that you may use or not -- they do not protect your form from spammers at all.
As you are protecting some server-side action you must validate a Captcha at the server-side before executing that protected action.
SimpleCaptcha captcha = SimpleCaptcha.load(request);
boolean isHuman = captcha.validate(captchaCode, captchaId);
$captcha = new SimpleCaptcha();
$isHuman = $captcha->Validate($captchaCode, $captchaId);
Angular CAPTCHA Integration Guide
Send us questions, suggestions contact form on captcha.com.
FAQs
BotDetect CAPTCHA Angular Module (TypeScript: Angular 2/4/5/6/7/8+)
The npm package angular-captcha receives a total of 757 weekly downloads. As such, angular-captcha popularity was classified as not popular.
We found that angular-captcha 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.