I'm trying to remember the session when the user logs on successfully.
The time of the session works correctly, just does not work when I close the tab of my browser (Chrome) and back into the page.
if ($authResult->isValid()) {
$identity = $authResult->getIdentity();
$authService->getStorage()->write($identity);
$time = 8640000; // 100 days 8640000/3600 = 2400 hours => 2400/24 = 100 days
if ($data['rememberme']==1) {
$sessionConfig = new SessionConfig();
$sessionConfig->setOptions(array(
'use_cookies' => true,
'cookie_httponly' => true,
'gc_maxlifetime' =>$time,
'cookie_lifetime' => $time,
));
$manager = new SessionManager($sessionConfig);
}
return $this->redirect()->toRoute('application');
}