# 4.12.1 ReCAPTCHA registration flow

*reCAPTCHAs are used to distinguish humans from automated bots, protecting websites from malicious activities like spam, fake registrations, data scraping, and brute-force attacks by presenting challenges that are difficult for computers but easy for humans to solve. They enhance online security, prevent abuse of services, ensure fair use of resources, and safeguard sensitive processes like online purchases and voting.*

To setup reCAPTCHA during registration, follow these steps:

1. Click on **Authentication** in the sidebar.\\

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2Fpg7c4nQBkFyBk1sPm05Z%2Fimage.png?alt=media&#x26;token=6dee4be2-f219-4109-bf0d-007f5913ed38" alt=""><figcaption><p>Fig. 4.12.1.a: Navingating to Authentication section</p></figcaption></figure>

2. Click on the **kebab menu (three dots)** on the right side of the registration flow. Click on **Duplicate**. A popup will appear.\
   &#x20;

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FM95JyhBScnBAZuF2iHnX%2Fimage.png?alt=media&#x26;token=697f4289-9ed2-4fc9-94d4-412d8ec7010d" alt=""><figcaption><p>Fig 4.12.1.b: Duplicating the existing registration flow</p></figcaption></figure>

3. In the popup, enter a **Name** for the flow, "ReCAPTCHA".\\

   <div align="center"><figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FY8Zms8eq33enxgveAlUh%2Fimage.png?alt=media&#x26;token=23b10cac-20f9-43e8-b695-ed300ffe0d5c" alt=""><figcaption><p>Fig 4.12.1.c: Giving a name to the new registration flow</p></figcaption></figure></div>

4. Click on **Duplicate**. You will be redirected to the flow configuation.\\

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FeOidvV7o5ne1HgBxukUR%2Fimage.png?alt=media&#x26;token=8f48ae5a-5079-49ee-9ce7-9bf45a7f3e9c" alt=""><figcaption><p>Fig 4.12.1.d: Duplicated registration flow configuration page</p></figcaption></figure>

5. Click on the **settings menu (gear icon)** on the right side of the **reCAPTCHA**. A popup will appear to configure the **reCAPTCHA**.\\

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2F7tML8kLJzmwIkLVRM1BW%2Fimage.png?alt=media&#x26;token=61beaf87-cbf8-4139-8afe-7b2c4bc2d51c" alt=""><figcaption><p>Fig 4.12.1.e: Proceeding to configure reCAPTCHA for registration</p></figcaption></figure>

6. Give it an **alias**. Enter your **reCAPTCHA Site Key** and **reCAPTCHA Secret**. You can turn on the **Use recaptcha.net** switch to utilize recaptcha.net for the CAPTCHA. If you want to use **reCAPTCHA v3**, you can turn on **reCAPTCHA v3** switch.\\

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FWxSyvLIzkNv162XOKiU8%2Fimage.png?alt=media&#x26;token=3483f425-09f6-4ec5-8bce-c7afc9847c31" alt=""><figcaption><p>Fig 4.12.1.f: Configuring reCAPTCHA for registration</p></figcaption></figure>

   <table><thead><tr><th width="196">Field Name</th><th width="147">Field Type</th><th>Description</th></tr></thead><tbody><tr><td>Alias</td><td>Text</td><td>Enter the Alias for the flow as required</td></tr><tr><td>Recaptcha Site Key</td><td>Text</td><td>Enter the value for the Recaptcha Site Key as generated from the Google reCAPTCHA portal.</td></tr><tr><td>Recaptcha Secret</td><td>Text</td><td>Enter the value for the Recaptcha Secret Key as generated from the Google reCAPTCHA portal.</td></tr><tr><td>Use recaptcha.net</td><td>Toggle</td><td>When activated, it utilizes recaptcha.net; when deactivated, it defaults to google.com.</td></tr></tbody></table>

7. Click **Save**.

8. Change the **Requirement** for reCAPTCHA from **Disabled** to **Required**.\\

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2Fn3ok1Cz1EGxPIakShtKs%2Fimage.png?alt=media&#x26;token=a4b32ef4-1ab0-4dd8-8bd8-a27edbd3efa9" alt=""><figcaption><p>Fig 4.12.1.g: Changing the 'Requirement' of reCAPTCHA for registration</p></figcaption></figure>

9. Click on the **Actions**, on the top right of the page, and then **Bind flow**. A popup will appear.\\

   <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FrLb5a5EMAOTxSVCZjpy0%2Fimage.png?alt=media&#x26;token=ffc526bf-d2ea-492a-8e1a-21fe206284c2" alt=""><figcaption><p>Fig 4.12.1.h: Proceeding to bind the registration reCAPTCHA flow</p></figcaption></figure>

10. Select the **Registration flow**.\\

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FhFHzcpIqTLQesnKBpD06%2Fimage.png?alt=media&#x26;token=76598bd5-2f7e-4110-ad2e-71448efc35a5" alt=""><figcaption><p>Fig 4.12.1.i: Selecting a flow to bind reCAPTCHA registration to</p></figcaption></figure>

11. Click **Save**.

12. Click on **Realm Settings**.\\

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FaCXEQVpVrqRYke9FDWe4%2Fimage.png?alt=media&#x26;token=6dea82f3-a7a4-4743-9b05-aae057785802" alt=""><figcaption><p>Fig 4.12.1.j: Navigating to Realm Settings</p></figcaption></figure>

13. Click on the **Security Defenses** tab and change the **X-Frame-Options** and **Content-Security-Policy** as required.\\

    <figure><img src="https://1778922777-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3EUK5AUZv0UVaI5S0CTM%2Fuploads%2FIAYh8TyC0Ns63qZK7AJl%2Fimage.png?alt=media&#x26;token=a57d01af-6243-42ed-8f8d-527e4718a600" alt=""><figcaption><p>Fig 4.12.1.k: Configuring Security Defenses for reCAPTCHA registration</p></figcaption></figure>

14. Click **Save.**
