Passing session token generated by impersonate API


I have a particular setup with 2 keycloak servers :

  • server A : contains users and expose a specific client
  • server B : using server A as an identity provider.

Then I have a app which :

  1. need to use the impersonate API of server A to generate a session token (OIDC) in the name of a user
  2. then redirect to server B

When the redirection is done, the session token is lost (whatever the method).

The main idea is to fake the connectivity of a user and avoid to ask for login/password.
Do you have an idea of what need to be fixed to achieve this ?

Thanks in advance