{"action":"created","issue":{"url":"https://api.github.com/repos/expressjs/cookie-session/issues/104","repository_url":"https://api.github.com/repos/expressjs/cookie-session","labels_url":"https://api.github.com/repos/expressjs/cookie-session/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/expressjs/cookie-session/issues/104/comments","events_url":"https://api.github.com/repos/expressjs/cookie-session/issues/104/events","html_url":"https://github.com/expressjs/cookie-session/issues/104","id":349734252,"node_id":"MDU6SXNzdWUzNDk3MzQyNTI=","number":104,"title":"Correct logOut using Passport. ClearCookie doesn't delete cookies.","user":{"login":"frederikhors","id":41120635,"node_id":"MDQ6VXNlcjQxMTIwNjM1","avatar_url":"https://avatars3.githubusercontent.com/u/41120635?v=4","gravatar_id":"","url":"https://api.github.com/users/frederikhors","html_url":"https://github.com/frederikhors","followers_url":"https://api.github.com/users/frederikhors/followers","following_url":"https://api.github.com/users/frederikhors/following{/other_user}","gists_url":"https://api.github.com/users/frederikhors/gists{/gist_id}","starred_url":"https://api.github.com/users/frederikhors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederikhors/subscriptions","organizations_url":"https://api.github.com/users/frederikhors/orgs","repos_url":"https://api.github.com/users/frederikhors/repos","events_url":"https://api.github.com/users/frederikhors/events{/privacy}","received_events_url":"https://api.github.com/users/frederikhors/received_events","type":"User","site_admin":false},"labels":[{"id":602603641,"node_id":"MDU6TGFiZWw2MDI2MDM2NDE=","url":"https://api.github.com/repos/expressjs/cookie-session/labels/awaiting%20more%20info","name":"awaiting more info","color":"cc317c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-08-11T13:30:59Z","updated_at":"2018-08-28T14:59:55Z","closed_at":"2018-08-18T20:50:24Z","author_association":"NONE","body":"I'm using `PassportJS` and this code for logout:\r\n\r\n```js\r\n  .get(\"/logout\", async (req, res) => {\r\n    await req.logout();\r\n    req.session = null;\r\n    await res.clearCookie(process.env.PROJECT_TITLE.toLowerCase());\r\n    await res.clearCookie(`${process.env.PROJECT_TITLE.toLowerCase()}.sig`);\r\n    return res.redirect(\"/\");\r\n  });\r\n```\r\n\r\nIt just changes the cookies but don't delete them. **Why?**\r\n\r\nIt does delete them if I use just this code:\r\n\r\n```js\r\n  .get(\"/logout\", async (req, res) => {\r\n    await res.clearCookie(process.env.PROJECT_TITLE.toLowerCase());\r\n    await res.clearCookie(`${process.env.PROJECT_TITLE.toLowerCase()}.sig`);\r\n    return res.redirect(\"/\");\r\n  });\r\n```\r\n\r\n**Where am I wrong?**"},"comment":{"url":"https://api.github.com/repos/expressjs/cookie-session/issues/comments/416619741","html_url":"https://github.com/expressjs/cookie-session/issues/104#issuecomment-416619741","issue_url":"https://api.github.com/repos/expressjs/cookie-session/issues/104","id":416619741,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjYxOTc0MQ==","user":{"login":"frederikhors","id":41120635,"node_id":"MDQ6VXNlcjQxMTIwNjM1","avatar_url":"https://avatars3.githubusercontent.com/u/41120635?v=4","gravatar_id":"","url":"https://api.github.com/users/frederikhors","html_url":"https://github.com/frederikhors","followers_url":"https://api.github.com/users/frederikhors/followers","following_url":"https://api.github.com/users/frederikhors/following{/other_user}","gists_url":"https://api.github.com/users/frederikhors/gists{/gist_id}","starred_url":"https://api.github.com/users/frederikhors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederikhors/subscriptions","organizations_url":"https://api.github.com/users/frederikhors/orgs","repos_url":"https://api.github.com/users/frederikhors/repos","events_url":"https://api.github.com/users/frederikhors/events{/privacy}","received_events_url":"https://api.github.com/users/frederikhors/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T14:59:55Z","updated_at":"2018-08-28T14:59:55Z","author_association":"NONE","body":"@tsm91 yes, it's good but the cookies are still there."}}
{"actor":{"display_login":"frederikhors"}}