transformSession
Transforms the session value before validate resolves the route principal.
This hook is intended for integrations that need to update or invalidate a stored session as part of authentication. Return the effective session value for this request, or null to reject the session.
The stored session is rewritten only when the returned value is not equal to the incoming session (!=). Returning an equal value skips CurrentSession.set.
Parameters
block
transformation function called with the session value read by the Sessions plugin.