lundi 5 novembre 2018

How to detect a period of inactivity in EmberJS?

I am trying to detect a period of user inactivity in my EmberJS application so that, after a certain duration I can call a session.inValidate method and revoke their authentication.

The only resource I have been able to find is an article here which I was advised in an original question is out of date and doesn't use current Ember concepts.

The out-of-date article suggested adding a property to the App object and updating the property on certain events like mousemove but I was unable to find a location to set this property correctly in either app.js or the config environment.

ember-concurrency was recommended but after looking at some of the documentation I still don't understand where such code fits in an EmberJS application structure.

Unfortunately I'm stuck at a point before I can give a code sample. Any advice is appreciated.




Aucun commentaire:

Enregistrer un commentaire