# Refresh IDP tokens in cluster mode

**URL:** <https://forum.keycloak.org/t/refresh-idp-tokens-in-cluster-mode/20338>\
**Category:** Getting advice\
**Tags:** clustering, identity-brokering, oidc, token-exchange\
**Created:** [February 20, 2023, 1:40pm UTC](https://forum.keycloak.org/t/refresh-idp-tokens-in-cluster-mode/20338 "2023-02-20T13:40:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hozaangelica](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/hozaangelica/32/6668_2.png) [@hozaangelica](https://forum.keycloak.org/u/hozaangelica)\
**Post date:** [February 20, 2023, 1:40pm UTC](https://forum.keycloak.org/t/refresh-idp-tokens-in-cluster-mode/20338/1 "2023-02-20T13:40:07Z")

</div>

Hello,

I have a Keycloak cluster with 2 nodes (A and B) and an Identity Provider set up and the following scenario:

- request token\_exchange between Keycloak and IDP from node A =\> everything works as expected and the new IDP tokens are retrieved
- after the new IDP token expires request token\_exchange between Keycloak and IDP from node B =\> I got invalid\_token error

I noticed that the Keycloak tokens obtained from the token\_exchange between Keycloak and IDP are not shared between the nodes. Do you know if is there a way we can share those tokens between the nodes?

Thank you!
