You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README it's described that $.fn.idleTimeout().logout(); should destroy the session. This doesn't work correctly because it creates a new $.fn.idleTimeout(). object with its default settings and then redirect you to default redirectUrl, not the one that you specified in the previously created object. Hopefully there would be some interface where one could the same object after it was initialized already.
Workaround for me was to use it like this: $idleTimeoutObj = $(document).idleTimeout({ ...
... $idleTimeoutObj.logout()
Speaking of which, if this is going to be fixed, it can be taken in mind that this jQuery extension don't necessarily need to be executed on an element. It can be made as a plugin executed directly on jQuery object. So $.idleTimeout and $.idleTimeout() instead of $.fn.idleTimeout and $(document).idleTimeout()
I was trying to do it like this and it worked but there were some issues so I didn't commit my code. I also had the idea of implementing the object as a Singleton which might not be bad direction to go
The text was updated successfully, but these errors were encountered:
In the README it's described that
$.fn.idleTimeout().logout();
should destroy the session. This doesn't work correctly because it creates a new$.fn.idleTimeout().
object with its default settings and then redirect you to defaultredirectUrl
, not the one that you specified in the previously created object. Hopefully there would be some interface where one could the same object after it was initialized already.Workaround for me was to use it like this:
$idleTimeoutObj = $(document).idleTimeout({ ...
...
$idleTimeoutObj.logout()
Speaking of which, if this is going to be fixed, it can be taken in mind that this jQuery extension don't necessarily need to be executed on an element. It can be made as a plugin executed directly on jQuery object. So
$.idleTimeout
and$.idleTimeout()
instead of$.fn.idleTimeout
and$(document).idleTimeout()
I was trying to do it like this and it worked but there were some issues so I didn't commit my code. I also had the idea of implementing the object as a Singleton which might not be bad direction to go
The text was updated successfully, but these errors were encountered: