Change position of Recaptcha V3 Privacy Policy?

5243 views
Skip to first unread message

Paul Selden

unread,
Jun 11, 2018, 8:18:05 AM6/11/18
to reCAPTCHA
The documentation for v3 is very lacking. Is there a way to position the "Protected by Recaptcha" notice?

Phelix Downs

unread,
Jun 18, 2018, 8:23:31 AM6/18/18
to reca...@googlegroups.com
indeed to the extent that I would hardly call that documentation, and the Recaptcha protection is not necessary, i would re implement it if it worked with the website, however, it was complicating issues and wouldnt stop spinning

On Mon, Jun 11, 2018 at 12:17 PM Paul Selden <psel...@gmail.com> wrote:
The documentation for v3 is very lacking. Is there a way to position the "Protected by Recaptcha" notice?

--
You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to recaptcha+...@googlegroups.com.
To post to this group, send email to reca...@googlegroups.com.
Visit this group at https://groups.google.com/group/recaptcha.
For more options, visit https://groups.google.com/d/optout.

reCAPTCHA support

unread,
Jun 18, 2018, 8:23:37 AM6/18/18
to reCAPTCHA
Hi Paul,

Please use 'inline' for the "data-badge" attribute if you'd like to customize the "Protected by reCAPTCHA" badge. 

Best Regards,

Herman Langner

unread,
Jun 18, 2018, 8:23:37 AM6/18/18
to reCAPTCHA
I agree there wasn't much documentation, but I found that V3 is almost 100% compatible with V2,

So currently you would have something along the lines of

for loading your script, currently it looks like it does not bind to anything so at best your options would be float left or float right.

you can go back to the V2 documentation and render explicitly to an element. 
https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit

where in the onload you would call grecaptcha.render where you can either specify the styling parameters in the call, or add it as an attribute to the element you want to bind to.

Note that this method kind of breaks the stock standard call they supply you with grecaptcha.ready since that approach relies on your specifying your key as a render parameter. I worked around it by calling execute after the element was rendered in the onload method.

Definitely not the cleanest solution but it definitely works. I hope there's more comprehensive documentation in the near future

Andrew M

unread,
Sep 17, 2018, 7:50:41 AM9/17/18
to reCAPTCHA
This doesn't seem to be working any longer. If I use explicit rendering for a v3 key, I get the inline badge with "Note for site owner: Invalid key type". Works as expected for a v2 key.

Also, with the v3 key, an execute(..) call after the render(...) gives a JS error regarding invalid site key.

Is there any solution for the inline badge with v3?

reCAPTCHA support

unread,
Sep 24, 2018, 4:49:11 PM9/24/18
to reCAPTCHA
Hi Andrew 

if you are using explicit rendering for a V3 Key , you need to pass the `size: "invisible"` in the list of parameters. Kindly let us know if this helps.

Andrew M

unread,
Sep 25, 2018, 1:28:15 PM9/25/18
to reCAPTCHA
Hi,

Thanks for your reply. Your suggestion helps a bit and the error "Invalid key type" on the badge has gone and the badge appears normal. However, I'm still having a couple of issues:

a) The deferred function with token attached to .execute() is not being called. 

b) There is a JS error saying: 
recaptcha__en.js:418 Uncaught Error: Invalid site key or not loaded in api.js: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX at Object.Bj [as execute] (recaptcha__en.js:418)

These two issues don't happen with the floating badge.

This is the code I am using:

   
    <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?render=explicit&onload=onCaptchaLoaded"></script>

   
<script type="text/javascript">
       
function onCaptchaLoaded() {
            console
.log("Google reCaptcha 3 : Rendering");
           
var grecaptchav3_sitekey = 'XXXXXXXXXXXXX';
           
            grecaptcha
.render(
               
'recaptcha_container',
               
{
                   
'sitekey': grecaptchav3_sitekey,
                   
'badge': 'inline',
                   
'size': 'invisible'
               
}
           
);
 
           
grecaptcha.ready(function() {
                console
.log("Google reCaptcha 3 : Executing");
                grecaptcha
.execute(grecaptchav3_sitekey, {action: 'my_test_action'})
               
.then(function(token) {
                    console
.log("Google reCaptcha 3 : Executed, token = " + token);
               
});
           
});
       
}
 
</script>

reCAPTCHA support

unread,
Sep 25, 2018, 3:10:55 PM9/25/18
to reCAPTCHA
Hi 

If you are rendering explicitly , you need to take the clientId which is returned by the call to grecaptcha.render and pass that in as the first argument to grecaptcha.execute. This is described in the Javascript API section of https://developers.google.com/recaptcha/docs/invisible.

Best Regards
-reCAPTCHA Team

Sarah Chandler

unread,
Dec 10, 2018, 1:20:21 PM12/10/18
to reCAPTCHA

scvbn (2).jpg

 notice?

Mohamed Baraka

unread,
Dec 26, 2018, 3:38:39 PM12/26/18
to reCAPTCHA
Reply all
Reply to author
Forward
0 new messages