Configure reCAPTCHA for Agate ?

23 views
Skip to first unread message

Dmitry Kuznetsov

unread,
May 11, 2021, 4:59:52 AM5/11/21
to obiba-users
Hi,

When I allow users to self-register via Agate, the inscription form contains  reCAPTCHA  widget. Out of box, it displays

ERROR for site owner:
Invalid domain for site key

I cannot find it in the latest online documentation.
Previous post 

How should I configure it for my site? should I sign up  at https://developers.google.com/recaptcha/
?

thanks,
Dmitry

Yannick Marcon

unread,
May 11, 2021, 5:51:31 AM5/11/21
to obiba...@googlegroups.com
Hi,

See reCaptcha guide at:

You need to "sign up for an API key pair", and select "reCAPTCHA version 2" (version 3 is not supported). Unfortunately this is another Google service dependency...

Regards
Yannick


--
You received this message because you are subscribed to the Google Groups "obiba-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to obiba-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/obiba-users/bd099fba-dd86-42f7-9b5c-d743a91d4de5n%40googlegroups.com.

Yannick Marcon

unread,
May 11, 2021, 7:25:08 AM5/11/21
to obiba...@googlegroups.com

Dmitry Kuznetsov

unread,
May 11, 2021, 10:00:53 AM5/11/21
to obiba-users
Hi Yannick,

yes, thanks, I signed up accordingly your suggestion for my URL code, put the code in application.yml,  now the inscription form shows up well formed.

However, back-end actions after sending the [user self-inscription] form fail, with agate.log containing these errors:

2021-05-11 13:35:29,589 WARN  org.glassfish.jersey.servlet.WebComponent - A servlet request to the URI https://localhost:8444/ws/users/_join contains form parameters in the request bo
dy but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource m
ethods consuming the request body by other means will not work as expected.
2021-05-11 13:35:31,194 WARN  org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver - Resolved exception caused by handler execution: org.springframework.web.Htt
pRequestMethodNotSupportedException: Request method 'POST' not supported
2021-05-11 13:35:31,202 WARN  org.obiba.jersey.exceptionmapper.UnhandledExceptionMapper - Exception catched by UnhandledExceptionMapper
org.springframework.web.client.HttpClientErrorException: 405 Request method 'POST' not supported
        at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:108)
        at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:709)
.....


the first warning shows up also at other POST operation, even when back-end completes as expected.
Please, let me know if I should open another ticket.

thanks,
Dmitry.

Message has been deleted

Yannick Marcon

unread,
May 11, 2021, 11:11:53 AM5/11/21
to obiba...@googlegroups.com
If the agate server has no access to the verification service (POST on the recaptcha.verifyUrl property, which I think is https://www.google.com/recaptcha/api/siteverify), then it will fail (as seen in the log).

Dmitry Kuznetsov

unread,
May 11, 2021, 11:58:21 AM5/11/21
to obiba-users
Hi again,

ah, yes, indeed I replaced verifyUrl  by the URL to be verified... stupid. Now works fine. Thanks!

thanks a lot,
Dmitry.
Reply all
Reply to author
Forward
0 new messages