I am using Angularjs with ASP Mvc.I'm using razor views and forms authentication.I'm fetching the data thorough web api and using token authentication for that. Now I want to handle session timeout on the client side and redirect user to the login page on session timeout. I am thinking of reading the session timeout from config and keep track of elapsed time through angularjs. On every server side call I'll check if half of the time has elapsed.If so then I'll refresh the session expiry time. I know that $timeout and $interval can be helpful but I dont know exactly how to use them in that scenario.There might be much better solutions than what I'm trying to do.I'm open to suggestions. Other option I have in mind is refresh session timeout on every $http call.
Asked
Active
Viewed 1,661 times
2
-
this link will help you with the solution https://stackoverflow.com/questions/16696969/angular-session-timeout-and-management – Emmon Jul 10 '18 at 06:47