I'm trying to execute some Apex in a
LogoutEventStream trigger that checks against the user's sessionId (
SessionManagement.getCurrentSession().get('SessionId'), however the SessionKey field provided by the LogoutEventStream does not match. Is there an encoding that is being used to transform it? Is there another way to match with the user's sessionId during a logoutevent?
Note, I unsuccessfuly attempted to use getCurrentSession in the Apex --> "System.UnexpectedException: Current session unavailable". I assume it failed because in the context of a LogoutEventTrigger, the session no longer exists. I also attempted to fire the trigger before insert but this is not supported for platform events.