Integrating reCAPTCHA with Next.js

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • recaptch-with-next

    A demo explaining how to integrate reCAPTCHA with NextJS

  • I will be using a plain starter built using create-next-app with a simple form. If you want to follow along, you can get the initial state from this commit. The initial setup looks like this, and it just shows your email in an alert when you click on register

  • react-google-recaptcha

    Component wrapper for Google reCAPTCHA

  • We would be using a library called react-google-recaptcha, a wrapper around reCAPTCHA v2 that provides access to its APIs via a React component. Let's install it -

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • node-fetch

    A light-weight module that brings the Fetch API to Node.js

  • For simplicity, I have installed a package called node-fetch, which is a light-weight wrapper that provides the window.fetch like API in Node environment.

  • react-hcaptcha

    hCaptcha Component Library for ReactJS and Preact

  • They also have a React wrapper component called @hcaptcha/react-hcaptcha, which also has a very similar API to the React component we used for reCAPTCHA. These are the only changes (apart from renaming reCAPTCHA variables) I had to integrate the component on the client in pages/index.js :

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Mastering The Heap: How to Capture and Store Images from Fetch Responses

    2 projects | dev.to | 2 May 2024
  • 5 Ways to Make HTTP Requests in Node.js

    3 projects | dev.to | 20 Feb 2024
  • A modest request: How do you fetch data in React 18+ WITHOUT a third party dependency?

    4 projects | /r/reactjs | 10 Dec 2023
  • Next-Level Technical Blogging with Dev.to API

    2 projects | dev.to | 13 Jun 2023
  • Scalability: the Lost Level of React State Management

    9 projects | dev.to | 1 Jun 2023