Skipping Session Validation Middleware During Impersonation in Platform
The Problem
In the Reimpact platform, we encountered an issue where session validation middleware was causing unexpected logouts during user impersonation. Specifically, the CheckValidSession and EnsureSingleSession middlewares were interfering with the impersonation process, leading to a frustrating user experience.
The Cause
The root cause of the problem lies in how the session is