Skip to content

changed expire time for currentChallengeId cookie to 'never' #7568

Merged
merged 1 commit into from

4 participants

@Kalcode

Changed the currentChallengeId cookie expire time to 'never'. Currently set to session which doesnt not allow redirect.

Have not tested on locally. Chrome and Firefox debugs indicate cookie is set to 'session' as does express documentation if its not set. Modifying cookies allows me to sign in to website as intended.

This should at least fix the cases where redirect works fine with cookies.

-This is a re-submit of an earlier PR, i couldn't seem to squash my commits, i think cause i did the edits via github first and then tried to clone and squash.

@Kalcode Kalcode changed the title from changed expire time for currentChallengeId cookie to changed expire time for currentChallengeId cookie to 'never'
@bugron bugron added the QA label
@BerkeleyTrue BerkeleyTrue merged commit 1533be6 into FreeCodeCamp:staging

1 check passed

Details continuous-integration/travis-ci/pr The Travis CI build passed
@Ricardo82 Ricardo82 commented on the diff
server/boot/challenge.js
@@ -515,7 +515,8 @@ module.exports = function(app) {
}
var view = challengeView[data.challengeType];
if (data.id) {
- res.cookie('currentChallengeId', data.id);

??

@Kalcode
Kalcode added a note

Line is still there, it was just changed with an additional parameter.

 +            res.cookie('currentChallengeId', data.id, {
 +              expires: new Date(2147483647000)});

Not sure what you are asking, "??" is a very unhelpful and ambiguous comment, if you could expand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.