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

error in variable configuration for express.js #28

Closed
mg1075 opened this issue Sep 28, 2016 · 4 comments

Comments

@mg1075
Copy link
Contributor

commented Sep 28, 2016

Please see:

maxAge: config.sessionExpiration,

image

I do not know where "config.sessionExpiration" is supposed to be coming from, because I see no where where it is set. Moreover, as far as I can tell, session expiration is not working. Try changing config/env/default.js maxAge to 5 seconds, and sessions still do not expire.

I'm pretty sure in express.js that you want to set the maxAge as:
maxAge: config.sessionCookie.maxAge

@mg1075

This comment has been minimized.

Copy link
Contributor Author

commented Sep 29, 2016

Once the maxAge variable was set,
there was another issue that crept up:
the session expired as the maxAge, regardless of user activity.

As per a hint in this stackoverflow answer,

when adding rolling: true to config/lib/express,
then the session did not expire while the user maintained
activity in the app.

image

@francisdaigle

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2016

Good catch! Looks like an oversight.

Would you be willing to submit a PR?

@mg1075

This comment has been minimized.

Copy link
Contributor Author

commented Sep 29, 2016

...kind of swamped today;
f.y.i. - here is a discussion on the mean.js gitter

[image: Inline image 1]

[image: Inline image 2]

On Thu, Sep 29, 2016 at 10:58 AM, Francis Daigle notifications@github.com
wrote:

Good catch! Looks like an oversight.

Would you be willing to submit a PR?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB7_S-8-hh03e97jAInKGWulD7ybQEOAks5qu-AtgaJpZM4KIVP9
.

@francisdaigle

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2016

No worries :)

Well, I think the simplest thing to do would be to change config.maxAge to config.sessionCookie.maxAge. Personally, I'm fine with the Express default (providing this oversight is fixed of course).

I'll try and take care of this later today. Wouldn't want anyone tripping on this.

Thanks again for the catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.