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 Versions

13
8

3.1.8

Diff

Changelog

Source

v3.1.8

  • Fixed async module options type in ts strict mode.
  • Declared used rxjs package as peerDependency.
chvarkov
published 3.1.7 •

Changelog

Source

v3.1.7

  • Smallfix with logging recaptcha results.
  • Fixed resolving error codes for enterprise validator.
chvarkov
published 3.1.6 •

Changelog

Source

v3.1.6

  • Fixed handling enterprise response without token properties info.
chvarkov
published 3.1.5 •

Changelog

Source

v3.1.5

  • Fixed recaptcha enterprise error handling.
chvarkov
published 3.1.4 •

Changelog

Source

v3.1.4

  • Fixed instance of response for recaptcha v2.
  • Fixed error handling for recaptcha enterprise.
  • Internal fixes.
  • Test coverage.
chvarkov
published 3.1.3 •

Changelog

Source

v3.1.3

  • Fixed response type for RecaptchaVerificationResult.getEnterpriseRiskAnalytics().
chvarkov
published 3.1.2 •

Changelog

Source

v3.1.2

  • Fixed http exception statuses for error codes: site-mismatch, browser-error (HTTP status - 400).
  • Added error code: incorrect-captcha-sol.
chvarkov
published 3.1.1 •

Changelog

Source

v3.1.1

  • Minor type fixes by eslint rules.
  • Fixes in: README.md, package.json.
chvarkov
published 3.1.0 •

Changelog

Source

v3.1.0

  • Added support reCAPTCHA Enterprise API.
  • Updated module options:
    • Updated secretKey as optional (shouldn't use for enterprise configuration).
    • Added enterprise option

| Property | Description | |---------------------------------|-------------| | enterprise.projectId | Required.<br> Type: string<br> Google Cloud project ID | | enterprise.siteKey | Required.<br> Type: string<br> reCAPTCHA key associated with the site/app. | | enterprise.apiKey | Required.<br> Type: string<br> API key associated with the current project. <br>Must have permission reCAPTCHA Enterprise API. <br> You can manage credentials here. |

Updated GoogleRecaptchaValidator interface

class GoogleRecaptchaValidator {
    validate(options: VerifyResponseOptions): Promise<RecaptchaVerificationResult<VerifyResponseV3>>;
}

Addded recaptcha validator for enterprise

@Injectable()
export class SomeService {
    constructor(private readonly recaptchaEnterpriseValidator: GoogleRecaptchaEnterpriseValidator) {
    }

    async someAction(recaptchaToken: string): Promise<void> {
        const result = await this.recaptchaEnterpriseValidator.validate({
            response: recaptchaToken,
            score: 0.8,
            action: 'SomeAction',
        });
        
        if (!result.success) {
            throw new GoogleRecaptchaException(result.errors);
        }
        
        const riskAnalytics = result.getEnterpriseRiskAnalytics();
        
        console.log('score', riskAnalysis.score);
        console.log('score', riskAnalysis.reasons);

        // TODO: Your implemetation
    }
}
chvarkov
published 3.0.3 •

Changelog

Source

v3.0.3

  • Updated README.md.
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