[keycloak-dev] Captcha on Login Page

David Lustig DLustig at carbonite.com
Wed Feb 22 16:23:21 EST 2017


That did it!  Extending the UsernamePasswordForm (and associated Factory), integrating the ReCaptcha code from the registration form action, deploying the jar just like any other custom authenticator, and updating login.ftl with the ReCaptcha div did the trick.

Thank you very much.

David Lustig

From: Stian Thorgersen [mailto:sthorger at redhat.com]
Sent: Wednesday, February 22, 2017 1:39 PM
To: David Lustig <DLustig at carbonite.com>
Cc: keycloak-dev at lists.jboss.org
Subject: Re: [keycloak-dev] Captcha on Login Page

You'll need to extend the user/password authenticator implementation to add the recaptcha stuff and at the same time add it to the freemarker template. That's it.

On 22 February 2017 at 16:24, David Lustig <DLustig at carbonite.com<mailto:DLustig at carbonite.com>> wrote:
Hello,

I have recently been tasked with enhancing our Keycloak 2.5.1 login page with ReCaptcha functionality.  We currently are planning to use the default login page, and were originally under the impression that fields could be added to it using a FormAction provider.  It appears that login page is not compatible with the FormAction provider, though.  Various comments, including those on https://issues.jboss.org/browse/KEYCLOAK-4379 , have noted that the Authentication SPI should be used instead.  The problem I am running into is that it appears the Authentication SPI is only for adding new pages to the login flow; it does not appear to support modifying the existing login page, unless I'm missing something.  Is there a way to modify the existing login page and logic such that no attempts will be made to log the user in unless he enters the correct captcha, similar to the way ReCaptcha is implemented in the registration flow?

Thank you for your help,

David Lustig
_______________________________________________
keycloak-dev mailing list
keycloak-dev at lists.jboss.org<mailto:keycloak-dev at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/keycloak-dev


More information about the keycloak-dev mailing list