Change the login session
To increase the login session time, open the /app/Config/Session.php file.
Find this line and increase the value (in seconds). Then save the file.
public int $expiration = 7200;
By default, the session lasts 7200 seconds (2 hours).
Updates may replace this file. Check the value again after each update.
The CSRF token
You don't need to change anything for the CSRF token. It stays valid until the browser is closed, so a page that is open for a long time still works.