grav-plugin-login icon indicating copy to clipboard operation
grav-plugin-login copied to clipboard

Captcha login

Open CristianRod21 opened this issue 5 years ago • 3 comments

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

CristianRod21 avatar Aug 29 '20 23:08 CristianRod21

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

rhukster avatar Aug 30 '20 02:08 rhukster

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.

CristianRod21 avatar Aug 30 '20 17:08 CristianRod21

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

sektor12 avatar Feb 09 '24 13:02 sektor12