# Session sharing with 2 clients with 2 different protocols

**URL:** <https://forum.keycloak.org/t/session-sharing-with-2-clients-with-2-different-protocols/14861>\
**Category:** Getting advice\
**Tags:** authentication, saml\
**Created:** [April 8, 2022, 11:42am UTC](https://forum.keycloak.org/t/session-sharing-with-2-clients-with-2-different-protocols/14861 "2022-04-08T11:42:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Althaf](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Althaf](https://forum.keycloak.org/u/Althaf)\
**Post date:** [April 8, 2022, 11:42am UTC](https://forum.keycloak.org/t/session-sharing-with-2-clients-with-2-different-protocols/14861/1 "2022-04-08T11:42:03Z")

</div>

Hi,

i have a realm where one client is with protocol openid(client1) and another with saml (cleint2).

Is it possible to share the session between the clients if the user logs in with client1 and can be used with client2.

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [April 8, 2022, 4:27pm UTC](https://forum.keycloak.org/t/session-sharing-with-2-clients-with-2-different-protocols/14861/2 "2022-04-08T16:27:56Z")

</div>

That works already by default in the Keycloak (if session means that user doesn’t need to login again). Of course you need to have proper implementation/flow where IDP session is created - that’s for example not a case of OIDC Direct Access Grants flow.

---

<div class="post-metadata">

**Author:** ![Althaf](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Althaf](https://forum.keycloak.org/u/Althaf)\
**Post date:** [April 11, 2022, 3:35am UTC](https://forum.keycloak.org/t/session-sharing-with-2-clients-with-2-different-protocols/14861/3 "2022-04-11T03:35:35Z")

</div>

> [@jangaraj](#):
>
> rse you need to have proper implementation/flow where IDP session is created - that’s for example not a case of OIDC Direct Access Grants flow.

Does this work, even if the keycloak clients are with 2 different protocols?

---

<div class="post-metadata">

**Author:** ![jangaraj](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/jangaraj/32/5175_2.png) [@jangaraj](https://forum.keycloak.org/u/jangaraj)\
**Post date:** [April 11, 2022, 4:20am UTC](https://forum.keycloak.org/t/session-sharing-with-2-clients-with-2-different-protocols/14861/4 "2022-04-11T04:20:53Z")

</div>

As I said yes. Why you don’t try it? That is the fastest option how to get answer without reading doc.
