Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joachim Andersen 38 posts 198 karma points
    Feb 04, 2014 @ 14:31
    Joachim Andersen
    0

    How to actively keep session alive

    Hi,

    Is it possible to keep the session alive by making an ajax call? If yes which call should I make?

    I've tried to make my own API method but my session still dies.

    Any input?

    Cheers Joachim

  • Kevin Jump 2342 posts 14869 karma points MVP 8x c-trib
    Feb 04, 2014 @ 18:39
    Kevin Jump
    0

    I belive the back end (at least in v6) calls ping.aspx - /umbraco/ping.aspx

    https://github.com/umbraco/Umbraco-CMS/blob/b3f6a8c71bdd84e874f0b643373cbbe1aec2fd90/src/Umbraco.Web/umbraco.presentation/keepAliveService.cs

    not sure if that helps/

  • Joachim Andersen 38 posts 198 karma points
    Feb 05, 2014 @ 07:20
    Joachim Andersen
    0

    I forgot to mention that I want to keep the current user logged in - also when the user is not in the backoffice. I have the following scenario:

    1) The user logs in to Umbraco 7

    2) The user navigates to a node

    3) The user clicks my custom action which results in a redirect to a page outside the backoffice (much like the preview)

    4) The user works in my custom context for a while

    5) The user returns to the backoffice and continues his/her work

    If the user stays in the custom context 4) for a long time the session is lost and the user is no longer authenticated. Is there a method I can call, that can keep the authentication alive?

    Cheers Joachim

  • Joachim Andersen 38 posts 198 karma points
    Feb 05, 2014 @ 23:11
    Joachim Andersen
    100

    My bad, it actually works as I intended it.

    I was fooled by the Umbraco backoffice which changes to the login screen after the getremainingseconds... call returns less the 30 no mater if the current user is still authenticated or not.

    Sorry for the noise . . .

    /Joachim

Please Sign in or register to post replies

Write your reply to:

Draft