How do we maintain a user session using AngularJS, without using cookiestore?


https://www.quora.com/How-do-we-maintain-a-user-session-using-AngularJS-without-using-cookiestore


In my project am using the following method.
1. implement session management at the server side.
2. write a web service which we call from the front end during the application startup to check whether the client  is authenticated if successful return user data in the response otherwise redirect it to login page.
3. also write the login service to return the user data on successful login or use the details provided by the user.
4.store those details in a factory or as an object in $rootScope so you can access it from anywhere.

check this link  https://medium.com/opinionated-a...

posted @ 2016-09-08 15:14  张同光  阅读(76)  评论(0编辑  收藏  举报