RelayState was removed from BrokeredIdentityContext Keycloak >= 13.0.0

I am currently using Keycloak 12.0.0 and I rely on BrokeredIdentityContext to retrieve the relayState using getCode() method. However, the getCode method was dropped from keycloak 13.0.0 and I can’t seem to find the relayState being stored somewhere else(context, userSession …etc).

This the PR that removed relayState from the context KEYCLOAK-14483 Broker state param fix · keycloak/keycloak@41dc94f · GitHub.

Could someone please help, where can I look for the relayState?

Thanks!