Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
angular-recaptcha3
Advanced tools
Readme
Angular v10+ integration with google recaptcha v2-3.
import { ReCaptchaModule } from 'angular-recaptcha3';
@NgModule({
imports: [
ReCaptchaModule.forRoot(RECAPTCHA_OPTION)
]
})
const RECAPTCHA_OPTION = {
language?: string;
invisible?: IRecaptchaOption;
normal?: IRecaptchaOption;
}
interface IRecaptchaOption {
sitekey: string;
theme?: string;
type?: string;
tabindex?: number;
badge?: string;
}
Option description: https://developers.google.com/recaptcha/docs/display
Language codes: https://developers.google.com/recaptcha/docs/language
Example AppModule:
import { ReCaptchaModule } from 'angular-recaptcha3';
@NgModule({
imports: [
ReCaptchaModule.forRoot({
invisible: {
sitekey: 'your key',
},
normal: {
sitekey: 'your key',
},
language: 'en'
}),
]
})
To initialize the recaptcha you need to insert in the template
<recaptcha
[size]="'invisible'"
(captchaResponse)="onCaptchaResponse($event)"
(captchaExpired)="onCaptchaExpired()">
</recaptcha>
<recaptcha
[size]="'normal'"
[hide]="false"
(captchaResponse)="onCaptchaResponse($event)">
</recaptcha>
onCaptchaExpired(event) {
console.log(event);
}
onCaptchaResponse(event) {
console.log(event);
}
Recaptcha has parametrs:
reCAPTCHA v3 introduces a new concept: actions. When you specify an action name in each place you execute reCAPTCHA you enable two new features:
a detailed break-down of data for your top ten actions in the admin console adaptive risk analysis based on the context of the action (abusive behavior can vary) Importantly, when you verify the reCAPTCHA response you should also verify that the action name matches the one you expect.
constructor(
private recaptchaService: ReCaptchaService
) { }
// ...
recaptchaService.execute({action: 'homepage'}).then(token => {
//...
});
Note: actions may only contain alphanumeric characters and slashes, and must not be user-specific.
A more detailed description of ReCaptcha: https://developers.google.com/recaptcha/intro
FAQs
Angular v10+ integration with google recaptcha v3
The npm package angular-recaptcha3 receives a total of 322 weekly downloads. As such, angular-recaptcha3 popularity was classified as not popular.
We found that angular-recaptcha3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.