grbsk / ng-idle

Responding to idle users in AngularJS applications.
http://hackedbychinese.github.io/ng-idle
MIT License
564 stars 195 forks source link

idle.watch is suspended when the mobile browser is minimised #205

Open sriramkondeti opened 7 years ago

sriramkondeti commented 7 years ago

Hi there,

Just would like to check with you, Is there a way to keep the idle.watch() running even when the browser is minimised in mobile? Am Developing a mobile website for a bank and security is the top priority. So, when the user Mobile browser is minimised, I was expecting the ng-idle to consider user state as inactive and log him out after the time out.So, when he opens the browser again he's already logged out.

Unfortunately this isn't happening on mobile chrome, Mozilla and safari. The pop-up count down starts when he opens a minimised browser and he believes that he can continue the session. But then he's already logged out on the server side and gets force logged out when he tries to perform a transaction.. This isn't appreciable from the UI/UX point of view.

I would like to know if theres any work around I can use to fix this issue. Much appreciable if you can help.

Thanks & Best Regards, Ram.

julienmusat commented 6 years ago

+1

I'm facing the same problem with suspended tabs, for instance when using chrome extension "The Great suspender" which allow you to suspend tab (to save memory), the timer stop running. When the user comes back and reload the tab, the idle timeout is not fired.

Any workaround ?

Thanks very much

julienmusat commented 6 years ago

I had a look at the improvement done here : 7e93bb9

Actually I noticed the browser local storage is lost when the tab is suspended.