-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
695-a-laravel-package-to-impersonate-users #128
Comments
Looks like this package doesn't work correctly with Jetstream. Freek - did you test it with Jetstream/Sanctum maybe? |
No, Jetstream / Sanctum didn't exist in 2017. |
@core45 please describe the problem in a bit more detail. I'd like to know what does not work before I dig into it. Will try it out on a Jetstream Inertia+Vue stack project. |
@core45 it so far works great on my Laravel 9 Jetstream project! |
Ok, you were right @core45, laravel-impersonate didn't play nicely together with Jetstream. I have only tested on Laravel v9.3.1, but since having upgraded to v9.5.1, I experienced the same issues. @luigel has posted a workaround here: 404labfr/laravel-impersonate#154 (comment) e.g. in //Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
Route::middleware(['auth:web', 'verified'])->get('/dashboard', function () {
return Inertia::render('Dashboard');
})->name('dashboard'); so, AFAIK, laravel-impersonate currently only works on standard auth middleware and accessing some route behind Sanctum middleware would cause the user's session to be logged out. |
Unfortunately I must use Laravel 8. And this solution with auth:web does not work. So I'm leaving it until I'm able to upgrade to 9 |
A Laravel package to impersonate users - Freek Van der Herten's blog on PHP, Laravel and JavaScript
https://freek.dev/695-a-laravel-package-to-impersonate-users
The text was updated successfully, but these errors were encountered: