Why is the login cookie set only for the session?

The cookie for the panel is set for the session only, so logins aren’t persisted after closing and re-opening your browser.
If this is by design, can we make it an optional config setting? It seems wrong to edit the kirby core in order to set a proper expiration

1 Like

Have to agree on this one, the constant logging in when creating new content, especially when setting up a new site is getting quite annoying. Is there a non-core way around this?

This is already an issue on GitHub: https://github.com/getkirby/panel/issues/438

In my case, it felt right to adjust the expire param in the setcookie function. I need to be logged in all the time and other users too because content changes frequently…

If anyone is wondering where to set the expire param, it is at line 157 -> kirby/core/user.php

cookie::set('kirby', $key, 0, '/', null, false, true);

Change the ‘0’ value to match a specific time (in seconds). Tested and worked.