# Using fingerprint to keep front-end users logged in

**URL:** <https://forum.getkirby.com/t/using-fingerprint-to-keep-front-end-users-logged-in/18702>\
**Category:** Questions\
**Tags:** v3\
**Created:** [July 4, 2020, 12:41pm UTC](https://forum.getkirby.com/t/using-fingerprint-to-keep-front-end-users-logged-in/18702 "2020-07-04T12:41:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkssmnt](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lkssmnt](https://forum.getkirby.com/u/lkssmnt)\
**Post date:** [July 4, 2020, 12:41pm UTC](https://forum.getkirby.com/t/using-fingerprint-to-keep-front-end-users-logged-in/18702/1 "2020-07-04T12:41:38Z")

</div>

Hi,

I have a site which is only accessible by logging in. As the users need to scan QR-Codes to add more content to their account, I want them to stay logged in constantly.

I have come across multiple posts like this one that use the fingerprint method.

> [@How can I use fingerprint?](https://forum.getkirby.com/t/how-can-i-use-fingerprint/6047):
>
> [https://getkirby.com/changelog/kirby-2-4-1](https://getkirby.com/changelog/kirby-2-4-1)[Search | Kirby CMS](https://getkirby.com/search?q=fingerprint) - In the future maybe. stuck_out_tongue I use Kirby 2.4.1. It says: Allow custom session fingerprinting to avoid session invalidation in environments, where IP addresses or User Agents change often. My enviroment changes IP:s often. That’s why I tried to add this to my config.php. s::$fingerprint = function() { return 'custom fingerprint'; } It did not work. It says: Parse error: syntax error, unexpected end of file in …

I can however not get it to work. When I paste

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

```

into my config.php it gives me the following fatal error:  
Fatal error: Uncaught Error: Access to undeclared static property: Kirby\Cms\S::$fingerprint in “URL”

I feel I am missing something obvious here, but cannot figure out what. Do I need to put the fingerprint method anywhere first or is it already implemented with the kirby install?

The rest of my config.php file looks like this:

```
return [
    'debug' => true,
    'scssNestedCheck' => true,
    'routes' => [
        ...
     ], ...
];

```

---

<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:** [July 4, 2020, 12:58pm UTC](https://forum.getkirby.com/t/using-fingerprint-to-keep-front-end-users-logged-in/18702/2 "2020-07-04T12:58:15Z")

</div>

You are trying to use Kirby 2 settings. Have a look at session config settings

---

<div class="post-metadata">

**Author:** ![lkssmnt](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lkssmnt](https://forum.getkirby.com/u/lkssmnt)\
**Post date:** [July 4, 2020, 1:52pm UTC](https://forum.getkirby.com/t/using-fingerprint-to-keep-front-end-users-logged-in/18702/3 "2020-07-04T13:52:19Z")

</div>

Ah, that makes sense. So I guess what I want is to have a “keep me logged in” checkbox for the front-end user login-page as well in some kind of form. Where can I find information on how to do something like that?

Thank you!

---

<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:** [July 4, 2020, 2:00pm UTC](https://forum.getkirby.com/t/using-fingerprint-to-keep-front-end-users-logged-in/18702/4 "2020-07-04T14:00:13Z")

</div>

> [@Request long session for frontend login](https://forum.getkirby.com/t/request-long-session-for-frontend-login/18514/7):
>
> Awesome! BTW: If you are implementing a frontend login form, it’s better to use the following: $user = $kirby-\>auth()-\>login($email, $password, /\* $long = \*/ true); The advantage is that this will give you brute-force protection for free.

And [session | Kirby CMS](https://getkirby.com/docs/reference/system/options/session)
