Problem/Motivation

The user does not get logged out immediately after 60 seconds even if the settings are set accordingly. It is observed that they are logged out after around 120 seconds.
Observations:
- "autologout_ajax_set_last" route is triggered because of the 'autologout.refresh' ajax event. This is triggered because the autologout_prevent hook is invoked. But I was not able to debug why this autologout_prevent hook gets invoked without any user activity. No kernel request got logged when I checked using an event subscriber.

Steps to reproduce

Drupal Version: 8.9.20
PHP Version: 7.3.33
Autologout Module Version: 8.x-1.3
Autologout Settings: Please refer to the screenshot attached.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 autologout.png718.35 KBbendale
autologout-settings.png287.28 KBbendale

Issue fork autologout-3307938

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bendale created an issue. See original summary.

bendale’s picture

StatusFileSize
new718.35 KB

DeaOm made their first commit to this issue’s fork.

deaom’s picture

Status: Active » Needs review

This issue is really strange as it seem it is only happening with the 60 setting, even if you enable the pop up to show. If you set it to anything grater like 80 or 120 it works as expected. Tested different possibilities and the one worked was the changing of the timer for resting the activity from one minute to a half of minute. Tested manually and the user gets logged out after one minute when that is set, also user gets normally logged out for grater times, like 2 minutes. I also added a test that demonstrated that, but the timeout there is se to 15 seconds, so the test does not take too much time to complete. Locally I also tested with the 60 setting in test and it's also working as expected.
The test for migration should fail here because of the core issue with that #3192893: [META] Serialization issues in Migration tests.

admirlju made their first commit to this issue’s fork.

admirlju’s picture

Status: Needs review » Reviewed & tested by the community

Tests pass locally they fail here because of the issue @DeaOm mentioned. Setting to RTBC.

admirlju’s picture

Doc fix was done just to fix some problems with the GitLab merge error after a rebase. Rebase was correct, just some weird bug caused it just not work. So I don't see the need to switch to needs review, leaving it as RTBC.

  • boshtian committed a584ec7e on 8.x-1.x authored by DeaOm
    Issue #3307938 by DeaOm, admirlju: Undetected request prevents logout --...
boshtian’s picture

Status: Reviewed & tested by the community » Fixed
boshtian’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.