connect-firebase
connect-firebase copied to clipboard
cookie.maxAge
Hi,
I am looking at how to set rolling option in with connect-firebase, but it seems that connect-firebase is re-utilising cookie.maxAge for the expires functionality, in other implementations (redis, mongo) this is a different setting (ttl).
Setting the cookie.maxAge gives an impression of the rolling session, but because it's also the cookie setting, it means the cookie is valid even after the browser is closed.
The changes would be as follows:
- var expires = typeof sess.cookie.maxAge === 'number' ? (+new Date()) + sess.cookie.maxAge : (+new Date()) + oneDayInMilliseconds;
+ var expires = typeof this.ttl === 'number' ? ((+new Date()) + this.ttl) : (+new Date()) + oneDayInMilliseconds;
Is that a change you'd want to see as a PR?
Thanks
yes, if you could create a PR for it that would be great - thanks!