Hello Kirby community,
we’ve got an kirby powered website with around 80 users. All the content is hidden for public and accessible only to those users.
Everyone can login into it and access the website, but we’ve noticed that users keep beeing logged out unregulary, I even addet this to config file:
c::set('panel.session.timeout', 600);
c::set('panel.session.lifetime', 600);
But it doesn’t help unfortunately. Are there some other solutions to this? 
You could try and use a custom session fingerprint, check out this thread for suggestions: Get a longer timeout in the panel
Hello @texnixe (again
)
should I paste this into config?:
public static function fingerprint() {
// custom fingerprint callback
if(is_callable(static::$fingerprint)) {
return call(static::$fingerprint);
}
if(!r::cli()) {
return sha1(Visitor::ua() . (ip2long($_SERVER['REMOTE_ADDR']) & ip2long('255.255.0.0')));
} else {
return '';
}
}
The fingerprint stuff goes into the config, but not the method, just the fingerprint. I only posted the method for reference what is happening there.
Sorry I’m being stupid about this, I’m trying to understand it 
The fingerprint stuff is this I supose?
return sha1(Visitor::ua() . (ip2long($_SERVER['REMOTE_ADDR']) & ip2long('255.255.0.0')));
so the config should be like something like this?
c::set('panel.session.timeout', 600);
c::set('panel.session.lifetime', 600);
return sha1(Visitor::ua() . (ip2long($_SERVER['REMOTE_ADDR']) & ip2long('255.255.0.0')));
No like this:
Make sure to use something unique
1 Like
Thanks, I’ve implemented it this way
c::set('panel.session.timeout', 600);
c::set('panel.session.lifetime', 600);
s::$fingerprint = function() {
return '_fingerprint';
Now I’m gonna watch it if it works 
You can use that hardcoded string for testing. But as I said, use something that is unique for each user in your final version.
something like this from @francoisromain would be enough?
s::$fingerprint = function() {
return $user_name . '-fingerprint';
};
I’d probably encode it somehow, eg
s::$fingerprint = function() {
return sha1($user_name . '-fingerprint');
};
1 Like
Just a small Feedback - it seems to work fine 
1 Like