Skip to content

Custom callbacks don't fire onSessionExtended #27

Description

@abezulski

When using custom callbacks, onSessionExtended event is not being fired:

$.jTimeout(
    {
        expiration_key: 'jtimeout-session-expiration',
        flashingTitleText: '!!!',
        timeoutAfter: 25,
        extendUrl: '/ping',
        logoutUrl: '/logout',
        loginUrl: '/login',
        secondsPrior: 10
        onPriorCallback: function () {
            $('#modal-session-timeout').modal('show'); //works fine
        },
        onTimeout: function () {
            window.location = '/logout'; // works fine
        },
        onSessionExtended: function () {
            $('#modal-session-timeout').modal('hide'); // does not get fired
        }
    }
);

$('.btn-extend-session').on('click', function () {
    $.jTimeout.reset();
    $('#modal-session-timeout').modal('hide');
});

Session gets renewed but boostrap modal window remains open. Any idea how to fix that?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions