0

I have created a session while user logged in my application. In login request response cookies are coming. But it's not getting saved in cookie store.

Request responce enter image description here

cookie store Can anyone help me on this ?

Regards, Kiran Gopal

2 Answers 2

1

I have disabled the web security in chrome. Now it's starts working.

chromium-browser --disable-web-security --user-data-dir
0

If you are using express-session and http server rather than https, then set the secure option for cookie false

app.use(session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: false }
}))
2
  • can you please share the code where you are setting the session ?@kiranGopal
    – Sohel
    Oct 20, 2016 at 9:26
  • var sessionOpts = { name: "quizme", resave: true, // genid: function(req) { // return "wewe"; // use UUIDs for session IDs // }, saveUninitialized: false, secret: 'keyboard cat', store: new MongoStore({ url: config.dbHost, autoReconnect: true }), cookie: { path: '/', domain: "", secure: false } // unset: 'keep' } Oct 20, 2016 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.