josiasmontag / laravel-recaptchav3

Laravel package for Google's Recaptcha V3
MIT License
203 stars 37 forks source link

Added RECAPTCHAV3_HIDDEN option to hide badge on pages without recapt… #7

Closed MarcosPer closed 4 years ago

MarcosPer commented 5 years ago

I recently implemented Google recaptcha v3, I run the javascript code on each page for for the proper functioning, but I don't want the banner to appear on all pages, only in that where it is in use.

I have hidden the banner according to the google guidelines that appear here. https://developers.google.com/recaptcha/docs/faq

works perffect.

The feature is disabled by default, it can be switched by editing RECAPTCHAV3_HIDDEN key (true/false) in the .env file

josiasmontag commented 5 years ago

Thanks for your PR!

What speaks against adding the CSS to your specific app.css? I would like to keep this package focused on the backend / Laravel part of Recaptcha. There are endless possibilities to customize the frontend / JS / CSS of Recaptcha and I am little bit afraid that such things could blow up this package unnecessarily 🤔

MarcosPer commented 5 years ago

If it is true that it can be added to a css file, In my case i modified the z-index in my css file but if you want to hide it and show only in the forms that are protected by recaptcha you must hide in your css file and add