Closed yiorgosn closed 5 years ago
Hi @yiorgosn,
this is how to use it. I've updated the documentation consequently.
var options = {'theme':'dark'};
var recaptcha = new Recaptcha('SITE_KEY', 'SECRET_KEY', options);
Thank you very much Paul for your immediate reply. Passing the dictionary should have worked also as I first tried. It still doesn't change theme colors on my end. It must be some other setting on my end that is not letting the dark theme work. Cheers!
You can check the example/server.js file if you want, I specified the dark theme in it.
Paul, I upgraded to version recaptcha 4.1.1 (Using site type v2 recaptcha) and followed both ways of passing the parameter.
Option 1: As a variable, options={'theme':'dark'} when i declare recaptcha and then used recaptcha.middleware.render in my route and
Option 2: Just using recaptcha.middleware.renderWith({'theme':'dark'}) in the route and not declaring an options variable in advance.
It still won't display the dark theme but your software otherwise works very well. It is a pleasure to use. Thank you.
var recaptcha = new Recaptcha('SITE_KEY', 'SECRET_KEY', options); I can't seem to pass any options ie {"theme" : "dark"} or theme="dark"?