404labfr / laravel-impersonate

Laravel Impersonate is a plugin that allows you to authenticate as your users.
https://marceau.casals.fr
1.95k stars 203 forks source link

Hide session data using Jetstream? #155

Open seabasss opened 2 years ago

seabasss commented 2 years ago

Is there a way to not log browser session data when you impersonate? E.g. I like the user to see their own history with ip and os under profile in jetstream, but not log when you’re impersonating.

I assume that a session record is required to be logged in, but would it be an idea to add a column to the session table with a impersonate flag so that those records could be hidden in the user profile? Not sure how hard that would be to tap into.

Or, delete the session record when leaving impersonation?

Any ideas? Thanks!

heychazza commented 2 years ago

I got to realise this too, I'd like to have this removed, sometimes I do a spot check to ensure everything is working smoothly.

MarceauKa commented 1 year ago

@seabasss @heychazza This package was created while jetstream was not a thing. Feel free to make a PR :)