{"action":"created","issue":{"url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot/issues/19","repository_url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot","labels_url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot/issues/19/comments","events_url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot/issues/19/events","html_url":"https://github.com/robwebdev/ember-cli-staticboot/issues/19","id":191281070,"number":19,"title":"Feature request: pass cookies from command line","user":{"login":"lolmaus","id":200884,"avatar_url":"https://avatars.githubusercontent.com/u/200884?v=3","gravatar_id":"","url":"https://api.github.com/users/lolmaus","html_url":"https://github.com/lolmaus","followers_url":"https://api.github.com/users/lolmaus/followers","following_url":"https://api.github.com/users/lolmaus/following{/other_user}","gists_url":"https://api.github.com/users/lolmaus/gists{/gist_id}","starred_url":"https://api.github.com/users/lolmaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lolmaus/subscriptions","organizations_url":"https://api.github.com/users/lolmaus/orgs","repos_url":"https://api.github.com/users/lolmaus/repos","events_url":"https://api.github.com/users/lolmaus/events{/privacy}","received_events_url":"https://api.github.com/users/lolmaus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-23T14:13:56Z","updated_at":"2016-12-05T08:01:36Z","closed_at":null,"body":"I would like my StaticBoot app to fetch some data via authenticated requests, then shoebox the result.\r\n\r\nAuthentication credentials should not leak into the browser sources, so I can't use normal env vars.\r\n\r\nThe simplest solution seems to be the following:\r\n1. Use Ember Simple Auth (`fastboot` branch)\r\n2. Authenticate in the browser app\r\n3. Copy the ESA cookie\r\n4. Somehow tell StaticBoot to use this cookie when making requests to the FastBoot-served app.\r\n5. ESA would restore the session from the cookie and let Ember Data do authenticated requests.\r\n\r\nThe only part missing is step 4."},"comment":{"url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot/issues/comments/264789571","html_url":"https://github.com/robwebdev/ember-cli-staticboot/issues/19#issuecomment-264789571","issue_url":"https://api.github.com/repos/robwebdev/ember-cli-staticboot/issues/19","id":264789571,"user":{"login":"lolmaus","id":200884,"avatar_url":"https://avatars.githubusercontent.com/u/200884?v=3","gravatar_id":"","url":"https://api.github.com/users/lolmaus","html_url":"https://github.com/lolmaus","followers_url":"https://api.github.com/users/lolmaus/followers","following_url":"https://api.github.com/users/lolmaus/following{/other_user}","gists_url":"https://api.github.com/users/lolmaus/gists{/gist_id}","starred_url":"https://api.github.com/users/lolmaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lolmaus/subscriptions","organizations_url":"https://api.github.com/users/lolmaus/orgs","repos_url":"https://api.github.com/users/lolmaus/repos","events_url":"https://api.github.com/users/lolmaus/events{/privacy}","received_events_url":"https://api.github.com/users/lolmaus/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T08:01:36Z","updated_at":"2016-12-05T08:01:36Z","body":"Let me share my pain why I need this.\r\n\r\nI'm retrieving star counts from GitHub. GitHub API is super greedy and allows only 60 requests per hour for anons. This means I can do as few as three builds per hour! :sob:\r\n\r\nI had to subscribe for a VPN service and keep switching VPN countries as I code.\r\n\r\nAuthenticated requests are limited at 5000 per hour, which should be just enough. Also, switching users is simpler than switching IP addresses.\r\n\r\nBut I don't know how to pass credentials without them leaking into the build.\r\n\r\nIf you have an approach on your mind but lack time, please explain it here so that I can attempt a PR.\r\n\r\nPS We could reorganize this issue to be more general rather than just cookies."}}
{"actor":{"display_login":"lolmaus"}}