# Problem session timeout

**URL:** <https://forum.getkirby.com/t/problem-session-timeout/10141>\
**Category:** Questions\
**Tags:** v2\
**Created:** [April 4, 2018, 8:19am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141 "2018-04-04T08:19:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mac](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mac](https://forum.getkirby.com/u/mac)\
**Post date:** [April 4, 2018, 8:19am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/1 "2018-04-04T08:19:30Z")

</div>

Hi,  
I state that I have already read some discussions about session time, but without reaching a solution to the problem.  
The problem is that the login time is too low.  
I tried to insert in config.php:

```
c::set('panel.session.timeout', 9000);
c::set('panel.session.lifetime', 9000);

```

and

```
s::$timeout = 60*24*30;
s::$cookie['lifetime'] = 9999999;

```

but the same problem.

Thanks for any help or suggestion.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 4, 2018, 8:39am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/2 "2018-04-04T08:39:37Z")

</div>

Have you tried with a custom session fingerprint yet? Check out this thread: [Get a longer timeout in the panel](https://forum.getkirby.com/t/get-a-longer-timeout-in-the-panel/8816/6)

For testing, you can use a simple string. For a permanent solution, you should use something unique, have a look at the original fingerprint and try to adapt that in a way that works for you.

---

<div class="post-metadata">

**Author:** ![mac](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mac](https://forum.getkirby.com/u/mac)\
**Post date:** [April 4, 2018, 9:17am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/3 "2018-04-04T09:17:42Z")

</div>

I read the discussion, unfortunately I do not understand how to use it.  
For example, the fingerprint method where it should be inserted? Maybe in the config.php file?

Then, maybe the fingerprint method also uses my IP address? If so, the IP address sometimes changes, so I would not solve the problem.

This method that does not use fingerprints:  
$user = site()-\>user();  
if($user) {  
$username = $user-\>username();  
}  
should be entered in config.php?  
Also, in place of “user” or “username” I have to enter the username I created during installation Kirby?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 4, 2018, 9:21am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/4 "2018-04-04T09:21:13Z")

</div>

Excactly, the code goes into the. config.php. For testing purposes, use a simple string:

```auto
s::$fingerprint = function() {
  return 'custom fingerprint';
};

```

If that helps, create a unique fingerprint, i.e. one that is unique for each user. If your logouts are due to frequent IP changes, don’t use the IP.

The whole purpose of this custom fingerprint is that it overwrites the native fingerprint (which uses the IP), see also this [explanation](https://forum.getkirby.com/t/how-can-i-use-fingerprint/6047/4?u=texnixe).

---

<div class="post-metadata">

**Author:** ![mac](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mac](https://forum.getkirby.com/u/mac)\
**Post date:** [April 4, 2018, 11:15am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/5 "2018-04-04T11:15:08Z")

</div>

It seems to it work.  
However, the method of creating finger print is not clear to me.  
For example, can I use a text like “Sed ut perspiciatis unde omnis iste natus error”?  
rather than: “DH/?@&%fj$K”?

Is there a documentation?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 4, 2018, 11:24am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/6 "2018-04-04T11:24:26Z")

</div>

There is no documentation.

The important thing is to understand what is does. The fingerprint should be different for each user, that’s why the original function uses a combination of IP and user agent string. If you only have one user, it doesn’t matter, you can just use a simple string. If you have multiple users, your fingerprint should have a dynamic part, like the user agent, the user name of whatever works best for you.

---

<div class="post-metadata">

**Author:** ![mac](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mac](https://forum.getkirby.com/u/mac)\
**Post date:** [April 4, 2018, 11:37am UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/7 "2018-04-04T11:37:02Z")

</div>

It continues to it work very well, no logout, this is great.  
Thank you very much for all the help and explanations.

(I would like to set this discussion as “SOLVED” but I do not know how to do it)

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:28pm UTC](https://forum.getkirby.com/t/problem-session-timeout/10141/8 "2025-02-06T17:28:28Z")

</div>

Archived on February 6, 2025, 5:28pm UTC


