{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/9995","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/9995/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/9995/comments","events_url":"https://api.github.com/repos/electron/electron/issues/9995/events","html_url":"https://github.com/electron/electron/issues/9995","id":242598929,"node_id":"MDU6SXNzdWUyNDI1OTg5Mjk=","number":9995,"title":"Feature Request: Possibility to persist session cookies","user":{"login":"rophy","id":592046,"node_id":"MDQ6VXNlcjU5MjA0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/592046?v=4","gravatar_id":"","url":"https://api.github.com/users/rophy","html_url":"https://github.com/rophy","followers_url":"https://api.github.com/users/rophy/followers","following_url":"https://api.github.com/users/rophy/following{/other_user}","gists_url":"https://api.github.com/users/rophy/gists{/gist_id}","starred_url":"https://api.github.com/users/rophy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rophy/subscriptions","organizations_url":"https://api.github.com/users/rophy/orgs","repos_url":"https://api.github.com/users/rophy/repos","events_url":"https://api.github.com/users/rophy/events{/privacy}","received_events_url":"https://api.github.com/users/rophy/received_events","type":"User","site_admin":false},"labels":[{"id":97403549,"node_id":"MDU6TGFiZWw5NzQwMzU0OQ==","url":"https://api.github.com/repos/electron/electron/labels/platform/windows","name":"platform/windows","color":"c7def8","default":false},{"id":124107069,"node_id":"MDU6TGFiZWwxMjQxMDcwNjk=","url":"https://api.github.com/repos/electron/electron/labels/status/wontfix%20:x:","name":"status/wontfix :x:","color":"e99695","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-07-13T06:31:42Z","updated_at":"2018-12-24T17:11:38Z","closed_at":"2018-09-24T05:06:13Z","author_association":"NONE","body":"* Electron version: 1.6.2\r\n* Operating system: win\r\n\r\n\r\nCurrently, if I close an electron app, all session cookies are lost. \r\nI'd like to have the possibility to keep session cookies.  I thought this can be done by using \"persist:\" partition, but it seems persistent partition has nothing to do with preserving session cookies.\r\n\r\n\r\nI tried these:\r\n\r\n1. Using partition\r\n```js\r\nnew BrowserWindow({\r\n  webPreferences: {\r\n    partition: 'persist:mywin'\r\n  }\r\n})\r\n```\r\n\r\n2. Using session with explicitly passed partition\r\n```js\r\nvar session = electron.session.fromPartition('persist:mywin');\r\n\r\nnew BrowserWindow({\r\n  webPreferences: {\r\n    session: session\r\n  }\r\n})\r\n\r\n```\r\n\r\nNote: \"session cookie\" are those with cookie.session = true. They're supposed to be cleared on closing browser, but sometimes it can be useful to keep session cookies. For example, Chrome's [Continue where you left off](https://support.google.com/chrome/answer/95314?hl=en).\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/449756099","html_url":"https://github.com/electron/electron/issues/9995#issuecomment-449756099","issue_url":"https://api.github.com/repos/electron/electron/issues/9995","id":449756099,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTc1NjA5OQ==","user":{"login":"jylopez","id":1951320,"node_id":"MDQ6VXNlcjE5NTEzMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/1951320?v=4","gravatar_id":"","url":"https://api.github.com/users/jylopez","html_url":"https://github.com/jylopez","followers_url":"https://api.github.com/users/jylopez/followers","following_url":"https://api.github.com/users/jylopez/following{/other_user}","gists_url":"https://api.github.com/users/jylopez/gists{/gist_id}","starred_url":"https://api.github.com/users/jylopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jylopez/subscriptions","organizations_url":"https://api.github.com/users/jylopez/orgs","repos_url":"https://api.github.com/users/jylopez/repos","events_url":"https://api.github.com/users/jylopez/events{/privacy}","received_events_url":"https://api.github.com/users/jylopez/received_events","type":"User","site_admin":false},"created_at":"2018-12-24T17:11:38Z","updated_at":"2018-12-24T17:11:38Z","author_association":"NONE","body":"@onassar and future googlers, I just used this instead of `util`:\r\n```\r\nvar url = `${(!cookie.httpOnly && cookie.secure) ? 'https' : 'http'}://${cookie.domain}${cookie.path}`\r\n```\r\n\r\n"}}
{"actor":{"display_login":"jylopez"}}