time() + YEAR_IN_SECONDS, 'path' => COOKIEPATH, 'domain' => (string) COOKIE_DOMAIN, 'secure' => is_ssl(), 'httponly' => true, 'samesite' => 'Lax', ] ); } return $token; } }