# How to integrate mosparo selfhosted captcha

**URL:** <https://forum.keycloak.org/t/how-to-integrate-mosparo-selfhosted-captcha/24563>\
**Category:** Extending the server\
**Created:** [February 14, 2024, 8:34am UTC](https://forum.keycloak.org/t/how-to-integrate-mosparo-selfhosted-captcha/24563 "2024-02-14T08:34:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![3c581abd](https://avatars.discourse-cdn.com/v4/letter/3/7c8e57/32.png) [@3c581abd](https://forum.keycloak.org/u/3c581abd)\
**Post date:** [February 14, 2024, 8:34am UTC](https://forum.keycloak.org/t/how-to-integrate-mosparo-selfhosted-captcha/24563/1 "2024-02-14T08:34:51Z")

</div>

Hi there!

I’m new to keycloak… and just used it for a while.  
Now i want to open my site for registration, and i want to use some selfhosted captcha-technology.

So i found [https://documentation.mosparo.io](https://documentation.mosparo.io) and for reference to implement i found [GitHub - p08dev/keycloak-hcaptcha: Keycloak deployment that provides similar functionality to Google reCaptcha, but with a more privacy friendly provider named hCaptcha.](https://github.com/p08dev/keycloak-hcaptcha)

But now… i’ve no idea, how to do this… And i find nothing with “keycloak” and “mosparo”, which helps me, to build a new provider for mosparo-captcha.

Does anyone have an idea, how to rework the hcaptcha- provider to mosparo?

Mosparo looks very good, and it’s selfhosted… so ideal for selfhosted keycloak… and i’m wondering, that there is nothing to find out there, about this combination…

My programming-skills are very basic… please can someone help me to get this work?

thank you

PS: I asked at github mosparo also for this discussion 187 (can not post links here)

---

<div class="post-metadata">

**Author:** ![appsec\_hero](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/appsec_hero/32/9788_2.png) [@appsec\_hero](https://forum.keycloak.org/u/appsec_hero)\
**Post date:** [February 15, 2024, 12:30am UTC](https://forum.keycloak.org/t/how-to-integrate-mosparo-selfhosted-captcha/24563/2 "2024-02-15T00:30:19Z")

</div>

Hello,  
Unfortunately, achieving this without programming isn’t possible.

You can achieve it by using the Authentication Service Provider Interface (SPI) to leverage your self-hosted captcha. This involves adding a new custom execution step that can be utilized within an authentication flow. You can find more information about Authentication SPI here: [Authentication SPI Documentation](https://www.keycloak.org/docs/23.0.6/server_development/#_auth_spi).

---

<div class="post-metadata">

**Author:** ![3c581abd](https://avatars.discourse-cdn.com/v4/letter/3/7c8e57/32.png) [@3c581abd](https://forum.keycloak.org/u/3c581abd)\
**Post date:** [February 19, 2024, 7:32pm UTC](https://forum.keycloak.org/t/how-to-integrate-mosparo-selfhosted-captcha/24563/3 "2024-02-19T19:32:35Z")

</div>

Now its working!

Have a look at [jakob/keycloak-mosparo: This is a new SPI for keycloak to integrate mosparo captcha based on the work of https://github.com/p08dev/keycloak-hcaptcha - Jagit](https://git.schuerz.at/jakob/keycloak-mosparo)

Docu ist not ready!
