• Resolved zemog

    (@zemog)


    Hey great plugin, I just love to see the session’s table with just one session per user ?? haha

    So, I’ve configured the plugin to “override oldest session” for all subscribers. Is there a way to automatically logout the previous session?

    I have a page on my site where subscribers have a player where they can listen to a bunch of audio clips. But I’d like to restrict usage to a single device at a time, therefore, if they login on another device, I’d like to expire the first device’s session and close it.

    My first thought was to have a JS on the page that checks every minute or so if the current session is still active, and if not, then just redirect the user to the login page. I may have a way to do this with a combination of a JS script calling an endpoint that verifies the session token, but because I saw something similar asked a few years back (https://www.ads-software.com/support/topic/shortcodes-for-user-session-management/), I thought it was better to ask before, just in case there’s a way to do it already.

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello !
    Thanks for you kind words @zemog <3

    I understand the “problem”, if there’s no interaction with the page (refresh, click on a link, and so on) or new session opened from another device (because you set it on 1 device/user, if I understand well) – so, if the user has left the player running in a forgotten tab to be clear ?? – the session is not counted as “idle”.

    A workaround would be to use session auto-termination, but I assume you don’t use it because you can’t just tell if the player is “forgotten” or currently playing and listen by someone.

    To be honest, it’s a use-case that is is not covered by the plugin because the number of way to “count” a session as idle (when there’s no interaction) is just astronomical.

    The solution you have in mind may be a solution for your case. But it will produce a huge number of hits on your site. Depending how much of your users have this behavior (and how much users you have on your site), it can be a good one or very bad one ??

    Sorry to not have an “out of the box” solution for this case…

    Thread Starter zemog

    (@zemog)

    No worries. I appreciate you took the time to address my “problem” ?? At least I now know that currently there isn’t a way to do it.

    I’ll experiment a bit with this to see if I can come up with something useful for my scenario.

    Thank you again.

    PS – Marking it as resolved for the time being ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Logout user’s other sessions’ is closed to new replies.