Question

7
Replies
2403
Views
Subh_1947 Member since 2011 10 posts
Cognizant
Posted: September 26, 2016
Last activity: October 4, 2018
Closed
Solved

Implementing Google reCaptcha in PEGA

The requirement is to implement Google Recaptcha in a PEGA screen.

Step 1: Get the site key from the Google recaptcha site-->DONE

Step 2 : Adding reCAPTCHA to the PEGA section. The following code snippet provided by Google has been included in a PEGA control which has been included in the section.

<pega:choose>
<pega:otherwise>
<%

%><!DOCTYPE html>

<head>
<script src='https://www.google.com/recaptcha/api.js'></script&gt;
</head>

<body>
<div class="g-recaptcha" data-sitekey="PublicKey"></div>

</form>
</body>
</html>
</pega:otherwise>
</pega:choose>

The Recaptcha widget is getting displayed correctly and the user can complete the captcha test using the Widget.

Step 3: Server side integration----@@@@This is where I am stuck @@@

According to Google,when the user submit the form where reCAPTCHA has been plugged in, we will get as part of the payload a string with the name "g-recaptcha-response" . How do we get hold of the value of this string in PEGA ? Once we have the value of this string we can leverage the OOTB rule pyValidateCustomCaptcha to validate the user's response with the Google recaptcha server.

Has anyone implemented the new reCaptcha. I have gone through the following PDN article but i think it depicts the older version of reCaptcha where text boxes were present to capture the user response.

https://pdn.pega.com/customizing-captcha-presentation-and-function

***Updated by moderator: Lochan to add Category***

***Updated by moderator: Marissa to add SR Details to post***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Data Integration SR Created
Moderation Team has archived post
Share this page LinkedIn