UAA slice loses "roles" property after token refresh

Hi there,

I am upgrading my application from 2023.06 to 2024.06 and am encountering a difference in behaviour regarding the process of refreshing the access_token that causes issues in my case.

I use OIDC and in my client i access the userRoles using the following selector:

const userRoles = useSelector(UaaSelectors.roles);

This initially works as expected, retrieving the appropriate roles of the oidc-user as soon as the property _roles is apparent in the UAA-slice.
However, when the access_token is refreshed, the property _roles disappears from the UAA-slice and is not replaced. This means for my client, that the selector also only returns undefined.

Strangely, the property _roles is actually correct, however the getter roles in the user object is left unavailable, leaving the return value of extractRoles undefined.
See attached screenshots:
Screenshot 2024-11-28 at 18.05.06
User object contains _roles after the silent_renew.

Screenshot 2024-11-28 at 18.05.17
User object does not contain getter roles although _roles is available after the silent_renew.

Does anyone know what i am missing to keep the roles of a given oidc-user accessible?

Hi @bastian-frosted-drift ,

I’m from UAA team, I can reproduce in my local.
Can you please create a bug ticket for that?

Thanks,

I created A12-16680 :+1:

The fix is available in the 2024.06-ext3 release.