function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sibasish Andre DeySibasish Andre Dey 

reCaptcha in Lightning Web Component LWC

I am trying to implement reCaptcha in LWC. 
I only complete example I find is here in the blog post 
Blog Post (https://www.learnexperiencecloud.com/s/article/Implementing-reCAPTCHA-in-Community-Cloud). 

Now my question is where do we expose the site key in LWC. 
If someone can guide me with an example for implementation of any version of reCaptcha in LWC that would be helpful.
Ashish Singh SFDCAshish Singh SFDC

Hi Sibasish,

You would basically expose it on Digital Experience Sites(Salesforce Communities) self-registration Page. Salesforce communities are kind of websites that are hosted under the force.com Platform. You can create your Communities by navigating to Setup>All Sites>. Click on the New button to create a new community and choose the template and start building the communities.

If you've ever worked with WordPress, then you would be able to relate it. 

Here is a very good article and video on How to Setup Salesforce Community (https://www.apexhours.com/how-to-setup-salesforce-community-part-1/)

Thanks,

Ashish Singh.

Sibasish Andre DeySibasish Andre Dey
Hi Aasish Singh,

I am aware of salesforce communities.. My question is not about setting reCaptcha in self registration page but more of technical code on how to implement the said captcha. If you see the blog link that I provided in the first post then they talk about implementination of captcha in Aura and LWC. 

I wanted to know how the site key in exposed inside the <script> tag for LWC.