ng-idle does not works when Mac goes to sleep

285 Views Asked by At

I want to logout user after 10mins of inactivity, I'm using ng-idle v6.0.0-beta.5

https://www.npmjs.com/package/@ng-idle/core

When computer goes to sleep, ng-idle stops working. In order to fix this issue, I have setTimeout to false before start watch.

reset() {
   this.idle.setTimeout(false); //added this line
   this.idle.watch();
   this.idleState = 'Started.';
   this.timedOut = false;
}

This approach works fine on Windows chrome, but not on Mac. Any work around to make it work on Mac?

0

There are 0 best solutions below