Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestlab/google-recaptcha

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestlab/google-recaptcha - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

2

guards/google-recaptcha.guard.js

@@ -29,3 +29,3 @@ "use strict";

const request = context.switchToHttp().getRequest();
const skip = this.options.skipIf ? await this.options.skipIf() : false;
const skip = this.options.skipIf ? await this.options.skipIf(request) : false;
if (skip) {

@@ -32,0 +32,0 @@ return true;

import { RecaptchaResponseProvider } from '../types';
export interface GoogleRecaptchaGuardOptions {
response: RecaptchaResponseProvider;
skipIf?: () => boolean | Promise<boolean>;
skipIf?: (request: any) => boolean | Promise<boolean>;
}
{
"name": "@nestlab/google-recaptcha",
"version": "1.1.4",
"version": "1.1.5",
"description": "Google recaptcha module for NestJS.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -27,3 +27,3 @@ # Google recaptcha module

response: req => req.headers.recaptcha,
skipIf: () => process.env.NODE_ENV !== 'production',
skipIf: async req => process.env.NODE_ENV !== 'production',
useRecaptchaNet: false,

@@ -40,9 +40,9 @@ agent: null

| Property | | Type | Description |
|-------------------|---|----------------------------|-------------|
| `secretKey` | ✔ | string | Google recaptcha secret key |
| `response` | ✔ | (request) => string | Function that returns response (recaptcha token) by request |
| `skipIf` | ✖ | () => boolean | Function that returns true if you need skip check for development or testing |
| `useRecaptchaNet` | ✖ | boolean | If your server has trouble connecting to https://www.google.com. You can use https://recaptcha.net instead, just set true |
| `agent` | ✖ | https.Agent | If you need to use an agent |
| Property | | Type | Description |
|-------------------|---|---------------------------------------------|-------------|
| `secretKey` | ✔ | string | Google recaptcha secret key |
| `response` | ✔ | (request) => string | Function that returns response (recaptcha token) by request |
| `skipIf` | ✖ | (request) => boolean \| Promise\<boolean\> | Function that returns true if you allow the request to skip the recaptcha verification. Useful for involing other check methods (e.g. custom privileged API key) or for development or testing |
| `useRecaptchaNet` | ✖ | boolean | If your server has trouble connecting to https://www.google.com. You can use https://recaptcha.net instead, just set true |
| `agent` | ✖ | https.Agent | If you need to use an agent |

@@ -49,0 +49,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc