getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

Captcha login #262

Open CristianRod21 opened 3 years ago

CristianRod21 commented 3 years ago

Hello,

I was wondering if is it possible to add captcha validation to any other page besides registration. I look up the code for login-form.html.twig and it's doesn't extends from the base template for forms. I can add the g-recaptcha-response and it's show up the checkbox but it won't validate this field. It's seems to me it's related to the event onFormProcessed which is never called because the submission of the form is handle directly as a task. . I'm a little lost honestly, i would like to know if this behavior was a decision or it's more like a bug.

Thanks, Christian

rhukster commented 3 years ago

You can add captcha to any form: https://learn.getgrav.org/16/forms/forms/reference-form-actions#captcha

CristianRod21 commented 3 years ago

First of all, thanks for your quick response. I did that. The only difference is that i defined the secret_key on the form plugin config. The captcha shows up on the login form, but it won't validate that it's checked, the login always pass through. I did the same thing for the register form and it works well, the issue is with the other forms from the login plugin.

sektor12 commented 4 months ago

I can confirm that the issue exists on my side as well. @CristianRod21 Have you got to solution?