{"action":"created","comment":{"url":"https://api.github.com/repos/developmentseed/scoreboard/pulls/comments/219991067","pull_request_review_id":158297947,"id":219991067,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTk5MTA2Nw==","diff_hunk":"@@ -30,18 +32,39 @@ if (NODE_ENV === 'test') {\n   }\n }\n else {\n-  passport.serializeUser((user, done) => done(null, user))\n-  passport.deserializeUser((id, done) => done(null, id))\n+  passport.serializeUser((osmProfile, done) => {\n+    done(null, osmProfile)\n+  })\n+\n+  passport.deserializeUser((osmProfile, done) => {\n+    done(null, osmProfile)\n+  })\n \n   passport.use(new OSMStrategy({\n     consumerKey: OSM_CONSUMER_KEY,\n     consumerSecret: OSM_CONSUMER_SECRET,\n     callbackUrl: `${API_URL}/auth/openstreetmap/callback`\n-  }, (token, tokenSecret, profile, done) => {\n-    if (profile) {\n-      return done(null, profile)\n+  }, async (token, tokenSecret, profile, done) => {","path":"api/src/passport.js","position":30,"original_position":30,"commit_id":"b36a70f0dd6343e6e307ce72ed422e5fc75b58b0","original_commit_id":"b36a70f0dd6343e6e307ce72ed422e5fc75b58b0","user":{"login":"sethvincent","id":164214,"node_id":"MDQ6VXNlcjE2NDIxNA==","avatar_url":"https://avatars1.githubusercontent.com/u/164214?v=4","gravatar_id":"","url":"https://api.github.com/users/sethvincent","html_url":"https://github.com/sethvincent","followers_url":"https://api.github.com/users/sethvincent/followers","following_url":"https://api.github.com/users/sethvincent/following{/other_user}","gists_url":"https://api.github.com/users/sethvincent/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvincent/subscriptions","organizations_url":"https://api.github.com/users/sethvincent/orgs","repos_url":"https://api.github.com/users/sethvincent/repos","events_url":"https://api.github.com/users/sethvincent/events{/privacy}","received_events_url":"https://api.github.com/users/sethvincent/received_events","type":"User","site_admin":false},"body":"Should we be storing the token/tokenSecret? Would we be able to login using those so that we don't have to grant oauth access on every login? I'll look into the openstreetmap provider to try to better understand how that works.","created_at":"2018-09-24T21:12:59Z","updated_at":"2018-09-24T21:12:59Z","html_url":"https://github.com/developmentseed/scoreboard/pull/28#discussion_r219991067","pull_request_url":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/developmentseed/scoreboard/pulls/comments/219991067"},"html":{"href":"https://github.com/developmentseed/scoreboard/pull/28#discussion_r219991067"},"pull_request":{"href":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28","id":217113329,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MTEzMzI5","html_url":"https://github.com/developmentseed/scoreboard/pull/28","diff_url":"https://github.com/developmentseed/scoreboard/pull/28.diff","patch_url":"https://github.com/developmentseed/scoreboard/pull/28.patch","issue_url":"https://api.github.com/repos/developmentseed/scoreboard/issues/28","number":28,"state":"open","locked":false,"title":"allow users to update data, starting with country","user":{"login":"sethvincent","id":164214,"node_id":"MDQ6VXNlcjE2NDIxNA==","avatar_url":"https://avatars1.githubusercontent.com/u/164214?v=4","gravatar_id":"","url":"https://api.github.com/users/sethvincent","html_url":"https://github.com/sethvincent","followers_url":"https://api.github.com/users/sethvincent/followers","following_url":"https://api.github.com/users/sethvincent/following{/other_user}","gists_url":"https://api.github.com/users/sethvincent/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvincent/subscriptions","organizations_url":"https://api.github.com/users/sethvincent/orgs","repos_url":"https://api.github.com/users/sethvincent/repos","events_url":"https://api.github.com/users/sethvincent/events{/privacy}","received_events_url":"https://api.github.com/users/sethvincent/received_events","type":"User","site_admin":false},"body":"There's a couple main todo items before merging this:\r\n\r\n- make sure routes are protected so only the authenticated user can update their own profile\r\n- add a link to the user edit page\r\n\r\n### Demonstration of user edit page:\r\n\r\n![scoreboard-edit-profile](https://user-images.githubusercontent.com/164214/45847958-a3688680-bce1-11e8-8794-2da28870d8a8.gif)\r\n","created_at":"2018-09-20T21:32:53Z","updated_at":"2018-09-24T21:12:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee98a65a3b388a19fa724540fa05e1c1d0376738","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28/commits","review_comments_url":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28/comments","review_comment_url":"https://api.github.com/repos/developmentseed/scoreboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/developmentseed/scoreboard/issues/28/comments","statuses_url":"https://api.github.com/repos/developmentseed/scoreboard/statuses/b36a70f0dd6343e6e307ce72ed422e5fc75b58b0","head":{"label":"developmentseed:feature/change-country","ref":"feature/change-country","sha":"b36a70f0dd6343e6e307ce72ed422e5fc75b58b0","user":{"login":"developmentseed","id":92384,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMzg0","avatar_url":"https://avatars0.githubusercontent.com/u/92384?v=4","gravatar_id":"","url":"https://api.github.com/users/developmentseed","html_url":"https://github.com/developmentseed","followers_url":"https://api.github.com/users/developmentseed/followers","following_url":"https://api.github.com/users/developmentseed/following{/other_user}","gists_url":"https://api.github.com/users/developmentseed/gists{/gist_id}","starred_url":"https://api.github.com/users/developmentseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developmentseed/subscriptions","organizations_url":"https://api.github.com/users/developmentseed/orgs","repos_url":"https://api.github.com/users/developmentseed/repos","events_url":"https://api.github.com/users/developmentseed/events{/privacy}","received_events_url":"https://api.github.com/users/developmentseed/received_events","type":"Organization","site_admin":false},"repo":{"id":143461755,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0NjE3NTU=","name":"scoreboard","full_name":"developmentseed/scoreboard","private":false,"owner":{"login":"developmentseed","id":92384,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMzg0","avatar_url":"https://avatars0.githubusercontent.com/u/92384?v=4","gravatar_id":"","url":"https://api.github.com/users/developmentseed","html_url":"https://github.com/developmentseed","followers_url":"https://api.github.com/users/developmentseed/followers","following_url":"https://api.github.com/users/developmentseed/following{/other_user}","gists_url":"https://api.github.com/users/developmentseed/gists{/gist_id}","starred_url":"https://api.github.com/users/developmentseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developmentseed/subscriptions","organizations_url":"https://api.github.com/users/developmentseed/orgs","repos_url":"https://api.github.com/users/developmentseed/repos","events_url":"https://api.github.com/users/developmentseed/events{/privacy}","received_events_url":"https://api.github.com/users/developmentseed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/developmentseed/scoreboard","description":"Scoreboard is a site that provides insight into OSM, making users not only more informed but more efficient.","fork":false,"url":"https://api.github.com/repos/developmentseed/scoreboard","forks_url":"https://api.github.com/repos/developmentseed/scoreboard/forks","keys_url":"https://api.github.com/repos/developmentseed/scoreboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/developmentseed/scoreboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/developmentseed/scoreboard/teams","hooks_url":"https://api.github.com/repos/developmentseed/scoreboard/hooks","issue_events_url":"https://api.github.com/repos/developmentseed/scoreboard/issues/events{/number}","events_url":"https://api.github.com/repos/developmentseed/scoreboard/events","assignees_url":"https://api.github.com/repos/developmentseed/scoreboard/assignees{/user}","branches_url":"https://api.github.com/repos/developmentseed/scoreboard/branches{/branch}","tags_url":"https://api.github.com/repos/developmentseed/scoreboard/tags","blobs_url":"https://api.github.com/repos/developmentseed/scoreboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/developmentseed/scoreboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/developmentseed/scoreboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/developmentseed/scoreboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/developmentseed/scoreboard/statuses/{sha}","languages_url":"https://api.github.com/repos/developmentseed/scoreboard/languages","stargazers_url":"https://api.github.com/repos/developmentseed/scoreboard/stargazers","contributors_url":"https://api.github.com/repos/developmentseed/scoreboard/contributors","subscribers_url":"https://api.github.com/repos/developmentseed/scoreboard/subscribers","subscription_url":"https://api.github.com/repos/developmentseed/scoreboard/subscription","commits_url":"https://api.github.com/repos/developmentseed/scoreboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/developmentseed/scoreboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/developmentseed/scoreboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/developmentseed/scoreboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/developmentseed/scoreboard/contents/{+path}","compare_url":"https://api.github.com/repos/developmentseed/scoreboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/developmentseed/scoreboard/merges","archive_url":"https://api.github.com/repos/developmentseed/scoreboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/developmentseed/scoreboard/downloads","issues_url":"https://api.github.com/repos/developmentseed/scoreboard/issues{/number}","pulls_url":"https://api.github.com/repos/developmentseed/scoreboard/pulls{/number}","milestones_url":"https://api.github.com/repos/developmentseed/scoreboard/milestones{/number}","notifications_url":"https://api.github.com/repos/developmentseed/scoreboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/developmentseed/scoreboard/labels{/name}","releases_url":"https://api.github.com/repos/developmentseed/scoreboard/releases{/id}","deployments_url":"https://api.github.com/repos/developmentseed/scoreboard/deployments","created_at":"2018-08-03T18:42:05Z","updated_at":"2018-09-19T18:24:53Z","pushed_at":"2018-09-24T21:07:43Z","git_url":"git://github.com/developmentseed/scoreboard.git","ssh_url":"git@github.com:developmentseed/scoreboard.git","clone_url":"https://github.com/developmentseed/scoreboard.git","svn_url":"https://github.com/developmentseed/scoreboard","homepage":"","size":1461,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":1,"default_branch":"master"}},"base":{"label":"developmentseed:master","ref":"master","sha":"bdd5822cf28b6e6ca9546a9246ba2db04eec8dff","user":{"login":"developmentseed","id":92384,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMzg0","avatar_url":"https://avatars0.githubusercontent.com/u/92384?v=4","gravatar_id":"","url":"https://api.github.com/users/developmentseed","html_url":"https://github.com/developmentseed","followers_url":"https://api.github.com/users/developmentseed/followers","following_url":"https://api.github.com/users/developmentseed/following{/other_user}","gists_url":"https://api.github.com/users/developmentseed/gists{/gist_id}","starred_url":"https://api.github.com/users/developmentseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developmentseed/subscriptions","organizations_url":"https://api.github.com/users/developmentseed/orgs","repos_url":"https://api.github.com/users/developmentseed/repos","events_url":"https://api.github.com/users/developmentseed/events{/privacy}","received_events_url":"https://api.github.com/users/developmentseed/received_events","type":"Organization","site_admin":false},"repo":{"id":143461755,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0NjE3NTU=","name":"scoreboard","full_name":"developmentseed/scoreboard","private":false,"owner":{"login":"developmentseed","id":92384,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyMzg0","avatar_url":"https://avatars0.githubusercontent.com/u/92384?v=4","gravatar_id":"","url":"https://api.github.com/users/developmentseed","html_url":"https://github.com/developmentseed","followers_url":"https://api.github.com/users/developmentseed/followers","following_url":"https://api.github.com/users/developmentseed/following{/other_user}","gists_url":"https://api.github.com/users/developmentseed/gists{/gist_id}","starred_url":"https://api.github.com/users/developmentseed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developmentseed/subscriptions","organizations_url":"https://api.github.com/users/developmentseed/orgs","repos_url":"https://api.github.com/users/developmentseed/repos","events_url":"https://api.github.com/users/developmentseed/events{/privacy}","received_events_url":"https://api.github.com/users/developmentseed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/developmentseed/scoreboard","description":"Scoreboard is a site that provides insight into OSM, making users not only more informed but more efficient.","fork":false,"url":"https://api.github.com/repos/developmentseed/scoreboard","forks_url":"https://api.github.com/repos/developmentseed/scoreboard/forks","keys_url":"https://api.github.com/repos/developmentseed/scoreboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/developmentseed/scoreboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/developmentseed/scoreboard/teams","hooks_url":"https://api.github.com/repos/developmentseed/scoreboard/hooks","issue_events_url":"https://api.github.com/repos/developmentseed/scoreboard/issues/events{/number}","events_url":"https://api.github.com/repos/developmentseed/scoreboard/events","assignees_url":"https://api.github.com/repos/developmentseed/scoreboard/assignees{/user}","branches_url":"https://api.github.com/repos/developmentseed/scoreboard/branches{/branch}","tags_url":"https://api.github.com/repos/developmentseed/scoreboard/tags","blobs_url":"https://api.github.com/repos/developmentseed/scoreboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/developmentseed/scoreboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/developmentseed/scoreboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/developmentseed/scoreboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/developmentseed/scoreboard/statuses/{sha}","languages_url":"https://api.github.com/repos/developmentseed/scoreboard/languages","stargazers_url":"https://api.github.com/repos/developmentseed/scoreboard/stargazers","contributors_url":"https://api.github.com/repos/developmentseed/scoreboard/contributors","subscribers_url":"https://api.github.com/repos/developmentseed/scoreboard/subscribers","subscription_url":"https://api.github.com/repos/developmentseed/scoreboard/subscription","commits_url":"https://api.github.com/repos/developmentseed/scoreboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/developmentseed/scoreboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/developmentseed/scoreboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/developmentseed/scoreboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/developmentseed/scoreboard/contents/{+path}","compare_url":"https://api.github.com/repos/developmentseed/scoreboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/developmentseed/scoreboard/merges","archive_url":"https://api.github.com/repos/developmentseed/scoreboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/developmentseed/scoreboard/downloads","issues_url":"https://api.github.com/repos/developmentseed/scoreboard/issues{/number}","pulls_url":"https://api.github.com/repos/developmentseed/scoreboard/pulls{/number}","milestones_url":"https://api.github.com/repos/developmentseed/scoreboard/milestones{/number}","notifications_url":"https://api.github.com/repos/developmentseed/scoreboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/developmentseed/scoreboard/labels{/name}","releases_url":"https://api.github.com/repos/developmentseed/scoreboard/releases{/id}","deployments_url":"https://api.github.com/repos/developmentseed/scoreboard/deployments","created_at":"2018-08-03T18:42:05Z","updated_at":"2018-09-19T18:24:53Z","pushed_at":"2018-09-24T21:07:43Z","git_url":"git://github.com/developmentseed/scoreboard.git","ssh_url":"git@github.com:developmentseed/scoreboard.git","clone_url":"https://github.com/developmentseed/scoreboard.git","svn_url":"https://github.com/developmentseed/scoreboard","homepage":"","size":1461,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":7,"license":null,"forks":0,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28"},"html":{"href":"https://github.com/developmentseed/scoreboard/pull/28"},"issue":{"href":"https://api.github.com/repos/developmentseed/scoreboard/issues/28"},"comments":{"href":"https://api.github.com/repos/developmentseed/scoreboard/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/developmentseed/scoreboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/developmentseed/scoreboard/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/developmentseed/scoreboard/statuses/b36a70f0dd6343e6e307ce72ed422e5fc75b58b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sethvincent"}}