
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
@google-recaptcha/react
Advanced tools
Tool that easily and quickly add Google ReCaptcha for your website or application
Google reCAPTCHA is a powerful library that provides easy integration of Google reCAPTCHA into your React applications. Built with TypeScript-first approach, SSR compatibility, and tree-shaking optimization - everything you need to protect your forms and applications from spam and abuse.
Visit https://siberiacancode.github.io/google-recaptcha/docs/react to view the full documentation.
npm install @google-recaptcha/react
import React from "react";
import ReactDOM from "react-dom/client";
import { GoogleReCaptchaProvider } from "@google-recaptcha/react";
import App from "./App";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<GoogleReCaptchaProvider type="v3" siteKey="your_site_key">
<App />
</GoogleReCaptchaProvider>
</React.StrictMode>
);
Create a component to use reCAPTCHA:
import type { FormEvent } from 'react';
import { useGoogleReCaptcha } from '@google-recaptcha/react';
export const Form = () => {
const googleReCaptcha = useGoogleReCaptcha();
const onSubmit = async (event: FormEvent) => {
event.preventDefault();
const token = await googleReCaptcha.executeV3('action');
...
};
return (
<form onSubmit={onSubmit}>
...
<button type="submit">Submit</button>
</form>
);
}
FAQs
Tool that easily and quickly add Google ReCaptcha for your website or application
The npm package @google-recaptcha/react receives a total of 6,346 weekly downloads. As such, @google-recaptcha/react popularity was classified as popular.
We found that @google-recaptcha/react demonstrated a healthy version release cadence and project activity because the last version was released less than 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.