{"action":"created","comment":{"url":"https://api.github.com/repos/andela/rivendell-ah/pulls/comments/207738077","pull_request_review_id":143412840,"id":207738077,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzczODA3Nw==","diff_hunk":"@@ -170,4 +172,29 @@ router.post('/users/verify/resend-email', (req, res, next) => {\n   return null;\n });\n \n+\n+router.get('/auth/google',\n+  passport.authenticate('google',\n+    { scope: ['profile', 'email'] }));\n+\n+router.get('/auth/linkedin',","path":"routes/api/users.js","position":28,"original_position":28,"commit_id":"7a6fc26eab066a5d564da4c6f231cac5bf54a2e3","original_commit_id":"7a6fc26eab066a5d564da4c6f231cac5bf54a2e3","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":"Expected a newline after '('   function-paren-newline","created_at":"2018-08-05T14:14:42Z","updated_at":"2018-08-05T14:14:43Z","html_url":"https://github.com/andela/rivendell-ah/pull/23#discussion_r207738077","pull_request_url":"https://api.github.com/repos/andela/rivendell-ah/pulls/23","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/andela/rivendell-ah/pulls/comments/207738077"},"html":{"href":"https://github.com/andela/rivendell-ah/pull/23#discussion_r207738077"},"pull_request":{"href":"https://api.github.com/repos/andela/rivendell-ah/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/andela/rivendell-ah/pulls/23","id":206237164,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjM3MTY0","html_url":"https://github.com/andela/rivendell-ah/pull/23","diff_url":"https://github.com/andela/rivendell-ah/pull/23.diff","patch_url":"https://github.com/andela/rivendell-ah/pull/23.patch","issue_url":"https://api.github.com/repos/andela/rivendell-ah/issues/23","number":23,"state":"open","locked":false,"title":"##159204696 Social Login","user":{"login":"chidioguejiofor","id":38565349,"node_id":"MDQ6VXNlcjM4NTY1MzQ5","avatar_url":"https://avatars1.githubusercontent.com/u/38565349?v=4","gravatar_id":"","url":"https://api.github.com/users/chidioguejiofor","html_url":"https://github.com/chidioguejiofor","followers_url":"https://api.github.com/users/chidioguejiofor/followers","following_url":"https://api.github.com/users/chidioguejiofor/following{/other_user}","gists_url":"https://api.github.com/users/chidioguejiofor/gists{/gist_id}","starred_url":"https://api.github.com/users/chidioguejiofor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chidioguejiofor/subscriptions","organizations_url":"https://api.github.com/users/chidioguejiofor/orgs","repos_url":"https://api.github.com/users/chidioguejiofor/repos","events_url":"https://api.github.com/users/chidioguejiofor/events{/privacy}","received_events_url":"https://api.github.com/users/chidioguejiofor/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n- adds social authentication to the app\r\n- adds a new model OauthUser to the app \r\n- adds `Google`, `Facebook` and `LinkedIn` authentication to the app \r\n- adds tests the app\r\n- updates `.env` of the application\r\n\r\n\r\n\r\n#### Description of Task to be completed?\r\n- a user should be able to login via social third-party account\r\n\r\n#### Any background context you want to provide?\r\n- creates a test Heroku app https://rivendell-oauth-test.herokuapp.com/ used to test the `OAuth's that require `https` \r\n\r\n#### How should this be manually tested?\r\n\r\n##### The app is currently hosted on a test Heroku app with hostname: `https://rivendell-oauth-test.herokuapp.com`. You can test the app on Heroku as follows:\r\n\r\n- LinkedIn\r\n       - `Paste` https://rivendell-oauth-test.herokuapp.com/api/auth/linkedin. \r\n```\r\n\r\n       - Click on enter\r\n       - You should see the following screen\r\n```\r\n\r\n<img width=\"1440\" alt=\"screen shot 2018-08-05 at 1 21 13 pm\" src=\"https://user-images.githubusercontent.com/38565349/43685877-02c83704-98b3-11e8-9c12-5b475451d09b.png\">\r\n\r\n```\r\n       - enter your LinkedIn credentials and hit enter\r\n       - you should get the following\r\n```\r\n\r\n- Facebook\r\n```\r\n       - Paste https://rivendell-oauth-test.herokuapp.com/api/auth/facebook  \r\n       - Click on enter\r\n       - You should see the following screen \r\n```\r\n\r\n<img width=\"1440\" alt=\"screen shot 2018-08-05 at 2 15 57 pm\" src=\"https://user-images.githubusercontent.com/38565349/43686264-613cc10e-98ba-11e8-8037-3c9b34ebb000.png\"> \r\n\r\n\r\n```\r\n       - enter your Facebook credentials and hit enter\r\n       - you should get the following \r\n_{\r\n         \"status\":\"success\",\r\n         \"data\":{\r\n               \"email\":\"<your-email>\",\r\n                \"name\":\"<your-name>\"\r\n            },\r\n            \"message\":\"Successfully authenticated the user\",\r\n             \"token\":\"eyJhbGciOiJIUzI1NiIsI....\"\r\n}_\r\n\r\n```\r\n\r\n- Google\r\n ```\r\n       - Paste https://rivendell-oauth-test.herokuapp.com/api/auth/google  \r\n       - Click on enter\r\n       - You should see the following screen\r\n```\r\n<img width=\"1440\" alt=\"screen shot 2018-08-05 at 1 24 20 pm\" src=\"https://user-images.githubusercontent.com/38565349/43685983-05b89ad2-98b6-11e8-8d5b-7cf14fd05c4b.png\">\r\n\r\n```\r\n       - enter your google credentials and hit enter\r\n       - you should get the following response\r\n\r\n_{\r\n         \"status\":\"success\",\r\n         \"data\":{\r\n               \"email\":\"<your-email>\",\r\n                \"name\":\"<your-name>\"\r\n            },\r\n            \"message\":\"Successfully authenticated the user\",\r\n             \"token\":\"eyJhbGciOiJIUzI1NiIsI....\"\r\n}_\r\n```\r\n\r\n##### You can also test it locally as follows:\r\n```\r\n-  run a `git pull`  command to get the branch\r\n-  update  the `.env` file \r\n- run `npm start` from command-line\r\n- from your browser paste localhost:3000/api/auth/google  to test the Google login\r\n- from your browser paste localhost:3000/api/auth/linkedin  to test the Linkedin login\r\n- from your browser paste localhost:3000/api/auth/facebook  to test the Facebook login\r\n```\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n- 159204696\r\n\r\n#### Notes:\r\n- The Heroku app was created because the `PR` for setting up Heroku has not yet been merged","created_at":"2018-08-05T12:49:39Z","updated_at":"2018-08-05T14:14:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f00ce676d62c4a7bc4be606ddac57eaf808707d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela/rivendell-ah/pulls/23/commits","review_comments_url":"https://api.github.com/repos/andela/rivendell-ah/pulls/23/comments","review_comment_url":"https://api.github.com/repos/andela/rivendell-ah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/rivendell-ah/issues/23/comments","statuses_url":"https://api.github.com/repos/andela/rivendell-ah/statuses/7a6fc26eab066a5d564da4c6f231cac5bf54a2e3","head":{"label":"andela:feat/social-login/#159204696","ref":"feat/social-login/#159204696","sha":"7a6fc26eab066a5d564da4c6f231cac5bf54a2e3","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":141551362,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1NTEzNjI=","name":"rivendell-ah","full_name":"andela/rivendell-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/rivendell-ah","description":null,"fork":false,"url":"https://api.github.com/repos/andela/rivendell-ah","forks_url":"https://api.github.com/repos/andela/rivendell-ah/forks","keys_url":"https://api.github.com/repos/andela/rivendell-ah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/rivendell-ah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/rivendell-ah/teams","hooks_url":"https://api.github.com/repos/andela/rivendell-ah/hooks","issue_events_url":"https://api.github.com/repos/andela/rivendell-ah/issues/events{/number}","events_url":"https://api.github.com/repos/andela/rivendell-ah/events","assignees_url":"https://api.github.com/repos/andela/rivendell-ah/assignees{/user}","branches_url":"https://api.github.com/repos/andela/rivendell-ah/branches{/branch}","tags_url":"https://api.github.com/repos/andela/rivendell-ah/tags","blobs_url":"https://api.github.com/repos/andela/rivendell-ah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/rivendell-ah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/rivendell-ah/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/rivendell-ah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/rivendell-ah/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/rivendell-ah/languages","stargazers_url":"https://api.github.com/repos/andela/rivendell-ah/stargazers","contributors_url":"https://api.github.com/repos/andela/rivendell-ah/contributors","subscribers_url":"https://api.github.com/repos/andela/rivendell-ah/subscribers","subscription_url":"https://api.github.com/repos/andela/rivendell-ah/subscription","commits_url":"https://api.github.com/repos/andela/rivendell-ah/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/rivendell-ah/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/rivendell-ah/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/rivendell-ah/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/rivendell-ah/contents/{+path}","compare_url":"https://api.github.com/repos/andela/rivendell-ah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/rivendell-ah/merges","archive_url":"https://api.github.com/repos/andela/rivendell-ah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/rivendell-ah/downloads","issues_url":"https://api.github.com/repos/andela/rivendell-ah/issues{/number}","pulls_url":"https://api.github.com/repos/andela/rivendell-ah/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/rivendell-ah/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/rivendell-ah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/rivendell-ah/labels{/name}","releases_url":"https://api.github.com/repos/andela/rivendell-ah/releases{/id}","deployments_url":"https://api.github.com/repos/andela/rivendell-ah/deployments","created_at":"2018-07-19T08:51:46Z","updated_at":"2018-08-03T09:52:03Z","pushed_at":"2018-08-05T14:14:30Z","git_url":"git://github.com/andela/rivendell-ah.git","ssh_url":"git@github.com:andela/rivendell-ah.git","clone_url":"https://github.com/andela/rivendell-ah.git","svn_url":"https://github.com/andela/rivendell-ah","homepage":null,"size":385,"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":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"staging"}},"base":{"label":"andela:staging","ref":"staging","sha":"f2631fcb05dbe2638b9148b41ee6c047bda49c35","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":141551362,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1NTEzNjI=","name":"rivendell-ah","full_name":"andela/rivendell-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/rivendell-ah","description":null,"fork":false,"url":"https://api.github.com/repos/andela/rivendell-ah","forks_url":"https://api.github.com/repos/andela/rivendell-ah/forks","keys_url":"https://api.github.com/repos/andela/rivendell-ah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/rivendell-ah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/rivendell-ah/teams","hooks_url":"https://api.github.com/repos/andela/rivendell-ah/hooks","issue_events_url":"https://api.github.com/repos/andela/rivendell-ah/issues/events{/number}","events_url":"https://api.github.com/repos/andela/rivendell-ah/events","assignees_url":"https://api.github.com/repos/andela/rivendell-ah/assignees{/user}","branches_url":"https://api.github.com/repos/andela/rivendell-ah/branches{/branch}","tags_url":"https://api.github.com/repos/andela/rivendell-ah/tags","blobs_url":"https://api.github.com/repos/andela/rivendell-ah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/rivendell-ah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/rivendell-ah/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/rivendell-ah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/rivendell-ah/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/rivendell-ah/languages","stargazers_url":"https://api.github.com/repos/andela/rivendell-ah/stargazers","contributors_url":"https://api.github.com/repos/andela/rivendell-ah/contributors","subscribers_url":"https://api.github.com/repos/andela/rivendell-ah/subscribers","subscription_url":"https://api.github.com/repos/andela/rivendell-ah/subscription","commits_url":"https://api.github.com/repos/andela/rivendell-ah/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/rivendell-ah/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/rivendell-ah/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/rivendell-ah/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/rivendell-ah/contents/{+path}","compare_url":"https://api.github.com/repos/andela/rivendell-ah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/rivendell-ah/merges","archive_url":"https://api.github.com/repos/andela/rivendell-ah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/rivendell-ah/downloads","issues_url":"https://api.github.com/repos/andela/rivendell-ah/issues{/number}","pulls_url":"https://api.github.com/repos/andela/rivendell-ah/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/rivendell-ah/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/rivendell-ah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/rivendell-ah/labels{/name}","releases_url":"https://api.github.com/repos/andela/rivendell-ah/releases{/id}","deployments_url":"https://api.github.com/repos/andela/rivendell-ah/deployments","created_at":"2018-07-19T08:51:46Z","updated_at":"2018-08-03T09:52:03Z","pushed_at":"2018-08-05T14:14:30Z","git_url":"git://github.com/andela/rivendell-ah.git","ssh_url":"git@github.com:andela/rivendell-ah.git","clone_url":"https://github.com/andela/rivendell-ah.git","svn_url":"https://github.com/andela/rivendell-ah","homepage":null,"size":385,"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":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/rivendell-ah/pulls/23"},"html":{"href":"https://github.com/andela/rivendell-ah/pull/23"},"issue":{"href":"https://api.github.com/repos/andela/rivendell-ah/issues/23"},"comments":{"href":"https://api.github.com/repos/andela/rivendell-ah/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/rivendell-ah/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/rivendell-ah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/rivendell-ah/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/andela/rivendell-ah/statuses/7a6fc26eab066a5d564da4c6f231cac5bf54a2e3"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}