Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
fastify-recaptcha
Advanced tools
zero dependency (except fastify-plugin) fastify recaptcha plugin options: ```ts /* https://developers.google.com/recaptcha/docs/verify Verification is failed if: score < 0.5 || success === false || options.hostaname && options.hostname !== host
zero dependency (except fastify-plugin) fastify recaptcha plugin
options:
/*
https://developers.google.com/recaptcha/docs/verify
Verification is failed if: score < 0.5 || success === false || options.hostaname && options.hostname !== hostname received from the google request
*/
interface Options {
recaptcha_secret_key: string,
reply?: boolean, // if true, will reply with 403 and error message on recaptcha verification error. If false/undefined, will decorate request with recaptcha field. This field contains all the information received from the google request
hostname?: string // if exists, a hostname check will be performed
}
example:
import fastifyRecaptcha from 'fastify-recaptcha'
//or const fastifyRecaptcha = require('fastify-recaptcha')
fastify.register(fastifyRecaptcha,{
recaptcha_secret_key:"your_recaptcha_sercret_key"
})
import fastifyRecaptcha from 'fastify-recaptcha'
//or const fastifyRecaptcha = require('fastify-recaptcha')
fastify.register(fastifyRecaptcha,{
recaptcha_secret_key:"your_recaptcha_sercret_key",
reply:true,
hostname:"subdomain.domain.com"
})
Don't forget to require g-recaptcha-response in protected routes.
const body_schema_route = {
type: 'object',
properties: {
"g-recaptcha-response": { type: 'string' },
},
required: ['g-recaptcha-response'],
}
FAQs
zero dependency (except fastify-plugin) fastify recaptcha plugin options: ```ts /* https://developers.google.com/recaptcha/docs/verify Verification is failed if: score < 0.5 || success === false || options.hostaname && options.hostname !== host
The npm package fastify-recaptcha receives a total of 514 weekly downloads. As such, fastify-recaptcha popularity was classified as not popular.
We found that fastify-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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.