Chuyển tới nội dung chính

Use Google reCAPTCHA

This guide explains how to use Google reCAPTCHA as the captcha of Casdoor. The type reCAPTCHA uses the reCAPTCHA v2 checkbox. See the reCAPTCHA documentation and the verification API.


Learning outcomes​

  • Register a reCAPTCHA key pair.
  • Add reCAPTCHA as a captcha provider in Casdoor.

What you need​

  • A Google account
  • Administrator access to the Casdoor admin console

Register a key pair​

  1. Register a site in the reCAPTCHA admin console.

  2. Select the reCAPTCHA type and add the domains of Casdoor, or the package names of your apps.

    Site registration in reCAPTCHA

  3. Accept the terms and click Register. Copy the site key and the secret key.

    Site key and secret key

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to Captcha and Type to the reCAPTCHA version that you registered: reCAPTCHA, reCAPTCHA v2, or reCAPTCHA v3.

  3. Enter the Site key and the Secret key.

    reCAPTCHA provider in Casdoor

  4. Click Preview to check the captcha.

    Preview of reCAPTCHA

  5. Save the provider.

Add the captcha to an application​

Open the edit page of the application, add the provider on the Providers tab, and save. See Add the captcha to an application.

reCAPTCHA in the application

See also​