# Discourse with Keycloak for SSO

**URL:** <https://meta.discourse.org/t/discourse-with-keycloak-for-sso/152922>\
**Category:** Development\
**Created:** [May 27, 2020, 8:59am UTC](https://meta.discourse.org/t/discourse-with-keycloak-for-sso/152922 "2020-05-27T08:59:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)\
**Post date:** [May 27, 2020, 9:10am UTC](https://meta.discourse.org/t/discourse-with-keycloak-for-sso/152922/2 "2020-05-27T09:10:33Z")

</div>

Easiest solution I have done for users with keycloak as their enterprise IAM is to set up discourse saml  
[https://github.com/discourse/discourse-saml](https://github.com/discourse/discourse-saml)

configuring keycloak saml is fairly straightforward

> **[SAML - Server Administration Guide](https://www.keycloak.org/docs/latest/server_admin/index.html#_saml)**
>
> SAML 2.0 is a similar specification to OIDC but more mature. It is descended from SOAP and web service messaging specifications so is generally more verbose than OIDC. SAML 2.0 is an authentication protocol that exchanges XML documents between...

Alernatively, you can connect via openID connect as well  
[https://github.com/discourse/discourse-openid-connect](https://github.com/discourse/discourse-openid-connect)

~~To let users automatically login with SAML, you’ll have to disable all other authentication methods including local login. make sure that your admin account already has a corresponding account on keycloak or you’ll be locked out of admin.~~

---

_[View the full topic](https://meta.discourse.org/t/discourse-with-keycloak-for-sso/152922)._
