GoogleCaptchaComponent
GoogleCaptchaComponent copied to clipboard
V3 Action name Param and load captcha on action
Hey, I loved the project, and it has been a big help at my company implementing Google recaptcha in a Blazor app we're building!
This PR adds some QOL things for v3 that we found helpful while not breaking any preexisting functionality.
- Added a new parameter,
Action
, for the component that can take an Action name for V3 and resolves #20 . This can work with or without the new delay in executing the captcha. - Added a new parameter,
RenderOnLoad,
that can be set to false to delay the execution of the captcha till an action happens. As recommended in the Google documentation. - Added a new public method named
ExecuteV3
that is used to execute the captcha along side with the action - I created two examples that showcase the changes, especially since a ref needed to be added to the component to call the execute. I was unsure of the best way to call a child component, so I kept it simple.
Any questions or changes please let me know! Thank you!