Why use Auto Logout in Angular 1 or Angular 2?
1. A user must be logged out after 10 to 15 minutes (As per you).
2. Every click interaction must reset the timer.
3. The timer must be synchronized between tabs and so on.
4. If users close the tab before your timer expires, he gets logged out when he visits again.
The below example helps us to handling the “Auto Logout” mechanism to maintain to web applications using “ng2-idle”.