Skip to content

Commit

Permalink
use configured guard name
Browse files Browse the repository at this point in the history
  • Loading branch information
jszobody committed Jan 3, 2022
1 parent 6fbaf3c commit 0f5c7be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

app(ImpersonateManager::class)->leave();
session()->forget('password_hash_web');
session()->forget('password_hash_' . config('filament-impersonate.guard'));

return redirect()->to(session()->pull('impersonate.back_to') ?? config('filament.path'));
})->name('filament-impersonate.leave')->middleware(config('filament-impersonate.leave_middleware'));
2 changes: 1 addition & 1 deletion src/CanImpersonateUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function impersonate($key)
auth()->user(), $target, config('filament-impersonate.guard')
);

session()->forget('password_hash_web');
session()->forget('password_hash_' . config('filament-impersonate.guard'));
session()->put('impersonate.back_to', request('fingerprint.path'));

return redirect(isset($this->url) ? $this->url : config('filament-impersonate.redirect_to'));
Expand Down

0 comments on commit 0f5c7be

Please sign in to comment.