Set Kirby login cookies to not expire

I’ve noticed that Kirby login cookies are set to expire when a session ends. Where can I change this behaviour to make these login cookies to never expire?

Currently, there is no config options. There is an issue on GitHub though:

I ended up changing the expire param in the core to match what I needed.

/kirby/core/user.php line 157

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

Yeah, if you depend on it, then there is no other way then modifying the core. Personally, I don’t like doing that but would probably do the same if I did indeed need the feature.

I may need a bit of help on this. Since Kirby 2.2 the coolkie::set has changed and I’m not sure what I should change to get a never expire cookie.

Now the code in Kirby is:

cookie::set( s::$name . '_auth', $key, s::$cookie['lifetime'], s::$cookie['path'], s::$cookie['domain'], s::$cookie['secure'], s::$cookie['httponly'] );

Any idea?