Open nie7321 opened 1 year ago
I can confirm this, too. When I try to leave impersonalization I am still logged with the same user.
any update on this?
any update on this?
@khalidmaquilang for me logout was working with these changes
any update on this?
@khalidmaquilang for me logout was working with these changes
this is good.. i hope they will merge this
Laravel Impersonate does not work with Laravel Octane. This manifests as several different errors concerning the
$app
container missing expected values when impersonating and leaving impersonation, from both theImpersonateManager
andImpersonateController
.I'm seeing two points where this is an issue:
ImpersonateServiceProvider
has the app container passed to the constructor. This doesn't work in the Octane paradigm -- the container is adjusted for every request, so a fresh copy is needed.register()
without that.ImpersonateController
sets themanager
property. It seems like the constructors for controllers are only called once when Octane boots, which is leading to the app container inside that manager instance being stale.If you are open to a PR, I would be happy to send one.