2

We have a custom PUBLIC community with a signup form. This community does not require login as the point is for the user to sign up. In this signup form, we have built a lightning component+vf page to handle google reCAPTCHA logic to prevent bot spam. We use an iframe within these components to display this reCAPTCHA widget ("I am not a robot!").

The problem however is that whenever not logged in and accessing this page (intended behavior), the reCAPTCHA logic doesn't work because the iframe where this reCAPTCHA logic is embedded within is attempting to bounce the user to the default login page since its an external URL.

My question: Is there anyway to either a) Override this behavior and DONT redirect to login or b) A better way to implement reCAPTCHA in this scenario and not have to deal with this?

Thanks! George

1 Answer 1

0

Found solution here: https://developer.salesforce.com/forums/?id=9060G0000005r71QAA.

Basically when referencing the visualforce page in the iframe you have to use the full community url and not just the internal salesforce url:

BAD:

<iframe aura:id="vfFrame" src="apex/<my-visualforce-page>" scrolling="no" frameborder="0" width="100%" allowtransparency="true"/>

GOOD:

<iframe aura:id="vfFrame" src="https://<my-community-url>/apex/<my-visualforce-page>" scrolling="no" frameborder="0" width="100%" allowtransparency="true"/>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .