artgon / angularjs-role-based-auth

Role based auth example in AngularJS
162 stars 39 forks source link

If you refresh the browser, the session service loses login info #1

Closed k2k2e6 closed 10 years ago

k2k2e6 commented 10 years ago

If you refresh the browser, session service will lose the current user name breaking the whole design. I tried checking with the server if the user is logged in - but doing that in "onStateChangeStart" cannot be done even with a promise.

artgon commented 10 years ago

This is just an example, not a full implementation. Ideally, your login check should return the logged in user so you can set them inside your session.