Configurable lifetime type: days or hours

Created on 5 November 2024, 5 months ago

Problem/Motivation

Instead of having to set the lifetime to a number of days, we'd like to set it to a number of hours.

Proposed resolution

Add a configuration option to the configuration form to set the lifetime type: days or hours.

Remaining tasks

Test/approve? :)

User interface changes

Extra configuration option in the settings. With an update-hook to set the default value to 'days'.

API changes

none

Data model changes

Configuration gets a new option: lifetime_type.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇳🇱Netherlands spadxiii

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @spadxiii
  • 🇳🇱Netherlands spadxiii

    Added a merge-request with the changes I made for this feature request.

  • Pipeline finished with Success
    5 months ago
    Total: 138s
    #329984
  • 🇳🇱Netherlands spadxiii

    (oops, double post; submit didn't seem to work first time)

  • Pipeline finished with Success
    5 months ago
    Total: 225s
    #330012
  • 🇨🇦Canada gapple

    Can you elaborate on your use-case of this short of a token lifetime, and why you would like to do this with Persistent Login rather than setting a short session lifetime or use a module that enforces a session timeout after a configurable period?

    With the module's recommended setting of the cookie_lifetime to 0, a browser will keep the session cookie until the browser is closed (provided it isn't still kept longer because of a session restore feature). With browsers remaining open in the background even when all windows are closed, the short-lifetime PL token could expire before the browser cleans up the session cookie.
    Since the session cookie takes precedence, it will in most cases likely outlive a short persistent login.

  • 🇨🇦Canada gapple

    I don't think a short persistent login lifetime is useful, since PL cookies are intended to have a longer lifetime than session cookies, and are ineffective in the inverse case.

    If you can better outline your use-case, and how it's addressed by allowing short PL lifetimes, please reopen the issue.

Production build 0.71.5 2024