{"action":"created","comment":{"url":"https://api.github.com/repos/andela/metis-ah/pulls/comments/216658309","pull_request_review_id":154188793,"id":216658309,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjY1ODMwOQ==","diff_hunk":"@@ -0,0 +1,50 @@\n+import passport from 'passport';\n+import GoogleStrategy from 'passport-google-oauth20';\n+import FaceBookStrategy from 'passport-facebook';\n+import dotenv from 'dotenv';\n+\n+import helpers from '../helpers/helpers';\n+import model from '../models/index';\n+\n+const { Users } = model;\n+\n+dotenv.config();\n+\n+passport.serializeUser(\n+  (user, done) => {\n+    done(null, user.id);\n+  }\n+);\n+\n+passport.deserializeUser(\n+  (id, done) => {\n+    Users.findById(id).then(\n+      (user) => {\n+        done(null, user);\n+      }\n+    );\n+  }\n+);\n+\n+passport.use(\n+  new GoogleStrategy(","path":"server/config/passportSetup.js","position":30,"original_position":30,"commit_id":"c2a231930b91fafa12ff46ed249fe317665fc4be","original_commit_id":"c2a231930b91fafa12ff46ed249fe317665fc4be","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Unexpected newline after '('   function-paren-newline","created_at":"2018-09-11T12:58:17Z","updated_at":"2018-09-11T12:58:19Z","html_url":"https://github.com/andela/metis-ah/pull/13#discussion_r216658309","pull_request_url":"https://api.github.com/repos/andela/metis-ah/pulls/13","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/metis-ah/pulls/comments/216658309"},"html":{"href":"https://github.com/andela/metis-ah/pull/13#discussion_r216658309"},"pull_request":{"href":"https://api.github.com/repos/andela/metis-ah/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/andela/metis-ah/pulls/13","id":213896620,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzODk2NjIw","html_url":"https://github.com/andela/metis-ah/pull/13","diff_url":"https://github.com/andela/metis-ah/pull/13.diff","patch_url":"https://github.com/andela/metis-ah/pull/13.patch","issue_url":"https://api.github.com/repos/andela/metis-ah/issues/13","number":13,"state":"open","locked":false,"title":"#159987403 social media authentication","user":{"login":"IyiKuyoro","id":30635021,"node_id":"MDQ6VXNlcjMwNjM1MDIx","avatar_url":"https://avatars1.githubusercontent.com/u/30635021?v=4","gravatar_id":"","url":"https://api.github.com/users/IyiKuyoro","html_url":"https://github.com/IyiKuyoro","followers_url":"https://api.github.com/users/IyiKuyoro/followers","following_url":"https://api.github.com/users/IyiKuyoro/following{/other_user}","gists_url":"https://api.github.com/users/IyiKuyoro/gists{/gist_id}","starred_url":"https://api.github.com/users/IyiKuyoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IyiKuyoro/subscriptions","organizations_url":"https://api.github.com/users/IyiKuyoro/orgs","repos_url":"https://api.github.com/users/IyiKuyoro/repos","events_url":"https://api.github.com/users/IyiKuyoro/events{/privacy}","received_events_url":"https://api.github.com/users/IyiKuyoro/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nImplement social media authentication\r\n#### Description of Task to be completed?\r\n- Install passport and passport strategies\r\n- setup authentication with facebook\r\n- setup authentication with google\r\n#### How should this be manually tested?\r\n1. Clone the repository.\r\n2. Checkout the `ft-social-login-#159987403` branch.\r\n3. Run npm install on your local machine.\r\n4. Run the db migrations using `npm run migrate`.\r\n5. Start the server using `npm run start_dev`.\r\n5. Access the following routes on a browser; `localhost:8000/api/users/auth/google` and `localhost:8000/api/users/auth/facebook`.\r\n#### Any background context you want to provide?\r\nThis feature should enable users to signup and signin using their social media accounts on google and facebook\r\n#### What are the relevant pivotal tracker stories?\r\n#159987403","created_at":"2018-09-07T11:18:16Z","updated_at":"2018-09-11T12:58:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7629250f0bfb43d9f91ea78fde555efa9f8ca87","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/metis-ah/pulls/13/commits","review_comments_url":"https://api.github.com/repos/andela/metis-ah/pulls/13/comments","review_comment_url":"https://api.github.com/repos/andela/metis-ah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/metis-ah/issues/13/comments","statuses_url":"https://api.github.com/repos/andela/metis-ah/statuses/c2a231930b91fafa12ff46ed249fe317665fc4be","head":{"label":"andela:ft-social-login-#159987403","ref":"ft-social-login-#159987403","sha":"c2a231930b91fafa12ff46ed249fe317665fc4be","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":145832105,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4MzIxMDU=","name":"metis-ah","full_name":"andela/metis-ah","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/metis-ah","description":null,"fork":false,"url":"https://api.github.com/repos/andela/metis-ah","forks_url":"https://api.github.com/repos/andela/metis-ah/forks","keys_url":"https://api.github.com/repos/andela/metis-ah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/metis-ah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/metis-ah/teams","hooks_url":"https://api.github.com/repos/andela/metis-ah/hooks","issue_events_url":"https://api.github.com/repos/andela/metis-ah/issues/events{/number}","events_url":"https://api.github.com/repos/andela/metis-ah/events","assignees_url":"https://api.github.com/repos/andela/metis-ah/assignees{/user}","branches_url":"https://api.github.com/repos/andela/metis-ah/branches{/branch}","tags_url":"https://api.github.com/repos/andela/metis-ah/tags","blobs_url":"https://api.github.com/repos/andela/metis-ah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/metis-ah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/metis-ah/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/metis-ah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/metis-ah/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/metis-ah/languages","stargazers_url":"https://api.github.com/repos/andela/metis-ah/stargazers","contributors_url":"https://api.github.com/repos/andela/metis-ah/contributors","subscribers_url":"https://api.github.com/repos/andela/metis-ah/subscribers","subscription_url":"https://api.github.com/repos/andela/metis-ah/subscription","commits_url":"https://api.github.com/repos/andela/metis-ah/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/metis-ah/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/metis-ah/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/metis-ah/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/metis-ah/contents/{+path}","compare_url":"https://api.github.com/repos/andela/metis-ah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/metis-ah/merges","archive_url":"https://api.github.com/repos/andela/metis-ah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/metis-ah/downloads","issues_url":"https://api.github.com/repos/andela/metis-ah/issues{/number}","pulls_url":"https://api.github.com/repos/andela/metis-ah/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/metis-ah/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/metis-ah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/metis-ah/labels{/name}","releases_url":"https://api.github.com/repos/andela/metis-ah/releases{/id}","deployments_url":"https://api.github.com/repos/andela/metis-ah/deployments","created_at":"2018-08-23T09:33:02Z","updated_at":"2018-09-11T10:54:18Z","pushed_at":"2018-09-11T12:58:00Z","git_url":"git://github.com/andela/metis-ah.git","ssh_url":"git@github.com:andela/metis-ah.git","clone_url":"https://github.com/andela/metis-ah.git","svn_url":"https://github.com/andela/metis-ah","homepage":null,"size":1515,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"db22d9a7bd227558af217b2096e728343493db61","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":145832105,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4MzIxMDU=","name":"metis-ah","full_name":"andela/metis-ah","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/metis-ah","description":null,"fork":false,"url":"https://api.github.com/repos/andela/metis-ah","forks_url":"https://api.github.com/repos/andela/metis-ah/forks","keys_url":"https://api.github.com/repos/andela/metis-ah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/metis-ah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/metis-ah/teams","hooks_url":"https://api.github.com/repos/andela/metis-ah/hooks","issue_events_url":"https://api.github.com/repos/andela/metis-ah/issues/events{/number}","events_url":"https://api.github.com/repos/andela/metis-ah/events","assignees_url":"https://api.github.com/repos/andela/metis-ah/assignees{/user}","branches_url":"https://api.github.com/repos/andela/metis-ah/branches{/branch}","tags_url":"https://api.github.com/repos/andela/metis-ah/tags","blobs_url":"https://api.github.com/repos/andela/metis-ah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/metis-ah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/metis-ah/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/metis-ah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/metis-ah/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/metis-ah/languages","stargazers_url":"https://api.github.com/repos/andela/metis-ah/stargazers","contributors_url":"https://api.github.com/repos/andela/metis-ah/contributors","subscribers_url":"https://api.github.com/repos/andela/metis-ah/subscribers","subscription_url":"https://api.github.com/repos/andela/metis-ah/subscription","commits_url":"https://api.github.com/repos/andela/metis-ah/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/metis-ah/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/metis-ah/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/metis-ah/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/metis-ah/contents/{+path}","compare_url":"https://api.github.com/repos/andela/metis-ah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/metis-ah/merges","archive_url":"https://api.github.com/repos/andela/metis-ah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/metis-ah/downloads","issues_url":"https://api.github.com/repos/andela/metis-ah/issues{/number}","pulls_url":"https://api.github.com/repos/andela/metis-ah/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/metis-ah/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/metis-ah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/metis-ah/labels{/name}","releases_url":"https://api.github.com/repos/andela/metis-ah/releases{/id}","deployments_url":"https://api.github.com/repos/andela/metis-ah/deployments","created_at":"2018-08-23T09:33:02Z","updated_at":"2018-09-11T10:54:18Z","pushed_at":"2018-09-11T12:58:00Z","git_url":"git://github.com/andela/metis-ah.git","ssh_url":"git@github.com:andela/metis-ah.git","clone_url":"https://github.com/andela/metis-ah.git","svn_url":"https://github.com/andela/metis-ah","homepage":null,"size":1515,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/metis-ah/pulls/13"},"html":{"href":"https://github.com/andela/metis-ah/pull/13"},"issue":{"href":"https://api.github.com/repos/andela/metis-ah/issues/13"},"comments":{"href":"https://api.github.com/repos/andela/metis-ah/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/metis-ah/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/metis-ah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/metis-ah/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/andela/metis-ah/statuses/c2a231930b91fafa12ff46ed249fe317665fc4be"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}