# Connect Keycloak to backend auth service

**URL:** <https://forum.keycloak.org/t/connect-keycloak-to-backend-auth-service/4883>\
**Category:** Extending the server\
**Tags:** authentication\
**Created:** [September 15, 2020, 8:58am UTC](https://forum.keycloak.org/t/connect-keycloak-to-backend-auth-service/4883 "2020-09-15T08:58:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tumenzul](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@tumenzul](https://forum.keycloak.org/u/tumenzul)\
**Post date:** [September 15, 2020, 8:58am UTC](https://forum.keycloak.org/t/connect-keycloak-to-backend-auth-service/4883/1 "2020-09-15T08:58:16Z")

</div>

I want to use Keycloak to enable third-party solutions to access our user database. Due to the privacy issue, we cannot connect directly to our database and we want to use the API service instead.

Is it possible for Keycloak to use the internally developed auth service (REST API) to authenticate the user?

Regards,  
Tumee

---

<div class="post-metadata">

**Author:** ![ArmanGhost](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/armanghost/32/1403_2.png) [@ArmanGhost](https://forum.keycloak.org/u/ArmanGhost)\
**Post date:** [September 22, 2020, 4:30am UTC](https://forum.keycloak.org/t/connect-keycloak-to-backend-auth-service/4883/2 "2020-09-22T04:30:30Z")

</div>

Hello, tumenzul  
We have identical setup. We have third party REST API auth system and we need to auth in it by keycloak.  
User auth in keycloak -\> keycloak auth in REST API auth system.  
It is possible by implementing new SPI’s and change browser and direct flow if you need.  
But we think Keycloak was not conceived for that 😆
