{"action":"closed","issue":{"url":"https://api.github.com/repos/kcbanner/connect-mongo/issues/178","labels_url":"https://api.github.com/repos/kcbanner/connect-mongo/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/kcbanner/connect-mongo/issues/178/comments","events_url":"https://api.github.com/repos/kcbanner/connect-mongo/issues/178/events","html_url":"https://github.com/kcbanner/connect-mongo/issues/178","id":79095638,"number":178,"title":"Mongostore problem","user":{"login":"kentyap","id":10970256,"avatar_url":"https://avatars.githubusercontent.com/u/10970256?v=3","gravatar_id":"","url":"https://api.github.com/users/kentyap","html_url":"https://github.com/kentyap","followers_url":"https://api.github.com/users/kentyap/followers","following_url":"https://api.github.com/users/kentyap/following{/other_user}","gists_url":"https://api.github.com/users/kentyap/gists{/gist_id}","starred_url":"https://api.github.com/users/kentyap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentyap/subscriptions","organizations_url":"https://api.github.com/users/kentyap/orgs","repos_url":"https://api.github.com/users/kentyap/repos","events_url":"https://api.github.com/users/kentyap/events{/privacy}","received_events_url":"https://api.github.com/users/kentyap/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-21T17:40:58Z","updated_at":"2015-07-17T08:44:13Z","closed_at":"2015-07-17T08:44:13Z","body":"I used connect-mongo to store my Sessions as follows\r\n// Express MongoDB session storage\r\nglobal.mgs = new mongoStore({\r\n   db: db.connection.db,\r\n   collection: config.sessionCollection\r\n});\r\n\r\nglobal.dbsession = session({\r\n   saveUninitialized: true,\r\n   resave: true,\r\n   secret: config.sessionSecret,\r\n   store: global.mgs\r\n\r\n});\r\n\r\n   app.use(global.dbsession);\r\n\r\nHowever I fail to retrieve the sessions using the following command.\r\nglobal.mgs.get(counter.sessionid, function (err, session) {\r\n   if (err || !session) {\r\n      console.log('fail to find sessid');\r\n   } else {\r\n      console.log('session ', session.sessionid);\r\n   }\r\n});\r\n\r\nIs there any documentation to use the mongostore to retrieve and save to the Mongodb directly.\r\n\r\nI am trying to terminate another login sessions to prevent multiple session using the same login ID.\r\n"}}