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

fix(sessions): make user cookie persistant #209

Merged
merged 2 commits into from
Jul 14, 2019
Merged

Conversation

adrienjoly
Copy link
Member

@adrienjoly adrienjoly commented Jul 14, 2019

Closes #208.

What does this PR do / solve?

User needs to login again, everytime they restarts their browser. (including Openwhyd's iOS and Electron apps)

Overview of changes

Specify a maxAge for cookies, so that they don't become browser-session-based by default.

How to test this PR?

  1. open an openwhyd session by logging in
  2. shut down your web browser, then restart it
  3. you should still be connected to your openwhyd account

@@ -144,16 +144,16 @@ function makeMongoUrl(params) {
}

function start() {
var myHttp = require('./app/lib/my-http-wrapper/http');
const myHttp = require('./app/lib/my-http-wrapper/http');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated change. #boyscoutrule

@adrienjoly adrienjoly changed the title fix: make user session more persistant fix(sessions): make user cookie persistant Jul 14, 2019
@adrienjoly adrienjoly added the bug label Jul 14, 2019
@adrienjoly adrienjoly self-assigned this Jul 14, 2019
@adrienjoly adrienjoly merged commit bba528d into master Jul 14, 2019
@adrienjoly adrienjoly deleted the fix/208-sticky-session branch July 14, 2019 13:59
adrienjoly pushed a commit that referenced this pull request Jul 14, 2019
## [1.11.1](v1.11.0...v1.11.1) (2019-07-14)

### Bug Fixes

* **sessions:** make user cookie persistant ([#209](#209)) ([bba528d](bba528d))
adrienjoly added a commit that referenced this pull request Jul 14, 2019
In #209, I re-introduced cookie expiration using express-session's maxAge property, but had defined it at the wrong path of the settings object.

Now defined in cookie.maxAge instead of just maxAge.
adrienjoly pushed a commit that referenced this pull request Jul 14, 2019
## [1.11.2](v1.11.1...v1.11.2) (2019-07-14)

### Bug Fixes

* **sessions:** define maxAge in the cookie property ([#210](#210)) ([6d3ffbb](6d3ffbb)), closes [#209](#209)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to re-login at every app launch
1 participant