Hi Everyone,

I'm just coming into Angular from a ColdFusion background, I'm building an 
Angular app based on 1.4 since I'm reading there is better cookie handling. 
 My question is kind of general in nature, but I am looking for examples on 
how to handle persisting a session in a cookie.

What is the best way to set a 1 hour expiration on a session cookie, and 
have it refresh its expiration date each time the location changes, or 
programmatically?  Most authentication examples set the cookie for a month 
or a year in the future which is pretty odd to me.  I suppose one could say 
there is no 'need' to have it expire after 30 minutes of inactivity if the 
session is not persisted at the server.  But lets assume mine is persisted 
at the server, or at least some resource is persisted there that I don't 
want inactive users hogging up, or it is a security sensitive app.

Is it as simple as checking for the cookie and updating it (if it exists) 
and updating the time in the 'run' method of my angular app module and also 
doing that in a $locationChangeStart handler?  How are you pros handling 
this, any good examples of this out there that I can build from?

Thanks,
Derrick

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to