User ID missing from logout event

Hello

I’m listening on keycloak logout event for custom action and i’m using the user ID to identify which user has logged out, it worked correctly before but since i upgraded to keycloak 18 from keycloak 16 i’m seeing some discrepencies and wondering why.

Old platform: keycloak 16
New platform: keycloak 18 with the following start param:
--spi-login-protocol-openid-connect-legacy-logout-redirect-uri=true

When i check the logout event page in the UI, i usually see the event with the following info:

Client	<empty>
User	<user ID>
IP Address	<IP address>
Details	
redirect_uri	<redirect uri>

But on some occasion, my openID connect logout contains nothing but the IP address, everything else is empty.

Client	<empty>
User	<empty>
IP Address	<IP address>
Details	<empty>

I tried to reproduce the problem but i havent found how yet.

Anybody knows why this is hapenning?