Code Monkey home page Code Monkey logo

react-csr-ssr-recaptcha-example's Introduction

react-csr-ssr-recaptcha-example

This repository is a barebones example of how to use Google reCAPTCHA v3 together with React (Client-side Rendering and Server-side Rendering)

Running Example Locally

Prerequisites

Requires Google reCAPTCHA v3 API key pair:

  1. Request an API key pair here
  2. In Domains options, add localhost and 127.0.0.1 (to allow calls from local machine)

Environment Variables

This example repository requires the following environment variables to work correctly:

  1. RECAPTCHA_SITE_KEY - Used to call reCAPTCHA API from Client-side
  2. RECAPTCHA_SECRET_KEY - Used to call reCAPTCHA API from Server-side (must not be exposed to public!)

Commands to run locally

Command What it does Default port
RECAPTCHA_SECRET_KEY=<recaptcha_secret_key_here> yarn start:backend Starts node backend instance 3005
RECAPTCHA_SITE_KEY=<recaptcha_site_key_here> yarn start:csr Starts React Client-side rendering instance 3001
RECAPTCHA_SITE_KEY=<recaptcha_site_key_here> yarn start:ssr Starts Next.js Server-side rendering instance 3002

References

react-csr-ssr-recaptcha-example's People

Contributors

nossbigg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.