Feature Switch account without logout login

88 Views Asked by At

My keycloak version is 16.1.1 My client needs features like a linked account. Example Account A linked to account B, account C, account D. In session A want to switch to session account B without login with username/password again. ( May be exchange access token acccount A --> access token account B).

I have a few options to solve the problem like:

  1. Use Impersonate (a feature of Keycloak ) --> Problem: seem Keycloak 16 does not support.
  2. For Every account login i will save the refresh token to attribute of user, they can switch to another account by refresh token exchange access token --> Problem: Access token too long timespan and at least account need to login 1 time
  3. Find way to generate access token like keycloak but i cant find any code ( spi, or code ). Maybe need to overwrite or see code at endpoint /realms/{realm}/protocol/openid-connect/token ---> I hope someone gives me some ideas to resolve this problem. I am very happy to hear you all. Thanks so much.
0

There are 0 best solutions below