Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.ttl not set #3

Closed
nono88 opened this issue Oct 6, 2014 · 4 comments
Closed

this.ttl not set #3

nono88 opened this issue Oct 6, 2014 · 4 comments

Comments

@nono88
Copy link

nono88 commented Oct 6, 2014

Hello;

I got an issue (which is maybe due to a misuse of your module)

I use it this way :

var MS = require('express-mongoose-store')(expressSession, mongoose);
var sessionStore = new MS({ttl: 600000});

but when i the cookie is set in function MongooseStore.prototype.set = function (sid, sess, fn) {
on this line :
var expires = Date.now() + this.ttl;
This.ttl is not set ( = null) then expires is an invalidate Date; and so i do not manage to get a functional cookie.

Did i miss something ?

Thank you
Arnaud

@nono88
Copy link
Author

nono88 commented Oct 6, 2014

this.ttl has been removed by this commit :
e1e9e65

@battlejj
Copy link
Owner

battlejj commented Oct 6, 2014

@nono88 this should fix the issue (36c04e5), thanks for bringing it to my attention, I missed this when reviewing the PR that introduced the bug. I will be pushing it to npm shortly.

@battlejj
Copy link
Owner

battlejj commented Oct 6, 2014

I've pushed the updated version to npm, going to close this issue out, but if you still have issues please let me know, better tests for the library is on the todo list but obviously isn't quite there yet. Thanks again.

@battlejj battlejj closed this as completed Oct 6, 2014
@nono88
Copy link
Author

nono88 commented Oct 6, 2014

Perfect thank you for your prompt answer :) and thanks for the module ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants