You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this happens because the ImpersonationController which implements stop-impersonate does not include the AuthenticateSession middleware. And so AuthenticateSession::storePasswordHashInSession($request) never get's called (after re-login as self), and so the session pw hash becomes the wrong one and causes logout after redirect.
I don't know enough about Statamic/Laravel to know the best fix. But moving the stop-impersonate route to the statamic.cp.authenticated group, which has the middleware, seems to resolve the issue for me. I guess alternatively have the controller explicitly include it.
Bug description
Recently, I've noticed that when I stop impersonating a user, I'm now logged out, instead of being redirected back to the Control Panel.
If I was to guess, I think #10548 might have caused it. It started happening around that time and the changes in that PR would make sense.
How to reproduce
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: