
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@pardjs/recaptcha-server
Advanced tools
The server side recaptcha module to do verification. Use with Google reCaptcha
This verification used the v3 method, which returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot).
The lib by default use the 0.6 as the default passed minScore(not included)
import Recaptcha from '@pardjs/recaptcha-server';
// #RECAPTCHA_SECRET get from the google recaptcha site.
const recInstance = new Recaptcha('#RECAPTCHA_SECRET#');
// Verifiy the token directly
// #RECAPTCHA_TOKEN get from the client
const v3Result = await recInstance.verifyV3Async('#RECAPTCHA_TOKEN#'); request.
// Verifiy the token with custom min passed score
const v3Result = await recInstance.verifyV3Async('#RECAPTCHA_TOKEN#', 0.8);
// The v3Result example
// {
// isPassed: true,
// score: 0.9,
// hostName: 'dozto.com',
// action: 'contactUs',
// checkedAt: 2019-04-03T08:51:34.038Z
// }
There will be a type in the throwed error object, and there are the following defined types
RECAPTCHA_VERIFY_ERROR: The verification handled by google successfully, but faild in the verificatoin result.
RECAPTCHA_UNEXPECTED_ERROR: Unexpected error during process google reCaptcha verification.
{ Error: [recaptcha-server] Failed to verify recaptcha: invalid-secret
at Recaptcha.<anonymous> (/Users/ole3021/workspaces/pardjs/recaptcha-server/src/recaptcha-server.ts:3006:35)
at step (/Users/ole3021/workspaces/pardjs/recaptcha-server/src/recaptcha-server.ts:2909:27)
at Object.next (/Users/ole3021/workspaces/pardjs/recaptcha-server/src/recaptcha-server.ts:2797:20)
at fulfilled (/Users/ole3021/workspaces/pardjs/recaptcha-server/src/recaptcha-server.ts:2736:32)
at process._tickCallback (internal/process/next_tick.js:68:7) type: 'RECAPTCHA_UNEXPECTED_ERROR' }
error.type === 'RECAPTCHA_VERIFY_ERROR' // true
FAQs
🔍The server side reCaptcha module to do verification.
We found that @pardjs/recaptcha-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.