From 0492a2ca823ca942e2b6fa6ad9b9b7f97e5194c1 Mon Sep 17 00:00:00 2001 From: gstrat88 Date: Mon, 24 Jun 2024 18:16:42 +0300 Subject: [PATCH] Update ImpersonateServiceProvider.php Since laravel 8 (https://github.com/laravel/framework/blob/8.x/src/Illuminate/Auth/AuthManager.php) there is a config for the remember duration, which needs to handle! --- src/ImpersonateServiceProvider.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ImpersonateServiceProvider.php b/src/ImpersonateServiceProvider.php index 0082015..0e873db 100644 --- a/src/ImpersonateServiceProvider.php +++ b/src/ImpersonateServiceProvider.php @@ -145,6 +145,10 @@ protected function registerAuthDriver() $guard->setRequest($app->refresh('request', $guard, 'setRequest')); } + if (isset($config['remember'])) { + $guard->setRememberDuration($config['remember']); + } + return $guard; }); }