diff --git a/src/ImpersonateServiceProvider.php b/src/ImpersonateServiceProvider.php index 0082015..a1743a7 100644 --- a/src/ImpersonateServiceProvider.php +++ b/src/ImpersonateServiceProvider.php @@ -131,7 +131,12 @@ protected function registerAuthDriver() $auth->extend('session', function (Application $app, $name, array $config) use ($auth) { $provider = $auth->createUserProvider($config['provider']); - $guard = new SessionGuard($name, $provider, $app['session.store']); + $guard = new SessionGuard( + $name, + $provider, + $app['session.store'], + rehashOnLogin: config('hashing.rehash_on_login', true) + ); if (method_exists($guard, 'setCookieJar')) { $guard->setCookieJar($app['cookie']); @@ -145,6 +150,8 @@ protected function registerAuthDriver() $guard->setRequest($app->refresh('request', $guard, 'setRequest')); } + + return $guard; }); }