{"action":"created","comment":{"url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/comments/172036839","pull_request_review_id":100994558,"id":172036839,"diff_hunk":"@@ -1,28 +1,35 @@\n import React from 'react';\n \n-// Options variable to request for implicit grant. Logic for assigning 'deviceSerialNumber' needs to be revisited.\n+// Options variable to request for implicit grant.\n+// TODO: Logic for assigning 'deviceSerialNumber' needs to be revisited.\n const options = {\n     scope : ['alexa:all', 'profile'],\n     scope_data : {\"alexa:all\":{\"productID\":\"Silent_Alexa\",\"productInstanceAttributes\":{\"deviceSerialNumber\":\"12345\"}}}\n };\n export default class LoginWithAmazon extends React.Component {\n   render() {\n     return (\n-        <button type='button' onClick={() => this.handleLogin()}><img alt=\"demoImage\" src=\"https://images-na.ssl-images-amazon.com/images/G/01/lwa/btnLWA_gold_156x32.png\"\n+      <button type='button' onClick={() => this.handleLogin()}>\n+        <img alt=\"demoImage\" src=\"https://images-na.ssl-images-amazon.com/images/G/01/lwa/btnLWA_gold_156x32.png\"\n           width=\"156\" height=\"32\" />\n-        </button>\n+      </button>\n     )\n   }\n \n   handleLogin() {\n+    // This returns an AuthorizeRequest object. After the request is complete, the object will\n+    // contain properties detailing the response\n     window.amazon.Login.authorize(options, response => this.handleResponse(response));\n   }\n \n   handleResponse(response) {\n-    if(response.error) {\n-          console.log(\"Encountered an error on login: \" + response.error)\n+    if(typeof response === 'undefined') {\n+      console.log(\"Response is undefined\");\n+    }\n+    else if(response.error) {\n+      console.log(\"Encountered an error on login: \" + response.error);","path":"src/LoginWithAmazon.js","position":30,"original_position":35,"commit_id":"e227c64c687dfb22e9e1d7fb6a2bc4b9a12b8d84","original_commit_id":"e227c64c687dfb22e9e1d7fb6a2bc4b9a12b8d84","user":{"login":"gootla-manasa","id":5608915,"avatar_url":"https://avatars1.githubusercontent.com/u/5608915?v=4","gravatar_id":"","url":"https://api.github.com/users/gootla-manasa","html_url":"https://github.com/gootla-manasa","followers_url":"https://api.github.com/users/gootla-manasa/followers","following_url":"https://api.github.com/users/gootla-manasa/following{/other_user}","gists_url":"https://api.github.com/users/gootla-manasa/gists{/gist_id}","starred_url":"https://api.github.com/users/gootla-manasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gootla-manasa/subscriptions","organizations_url":"https://api.github.com/users/gootla-manasa/orgs","repos_url":"https://api.github.com/users/gootla-manasa/repos","events_url":"https://api.github.com/users/gootla-manasa/events{/privacy}","received_events_url":"https://api.github.com/users/gootla-manasa/received_events","type":"User","site_admin":false},"body":"Updated the console log to print the response deeply in case of error.","created_at":"2018-03-04T04:27:48Z","updated_at":"2018-03-04T04:27:48Z","html_url":"https://github.com/s-maheshbabu/silent-alexa/pull/1#discussion_r172036839","pull_request_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/comments/172036839"},"html":{"href":"https://github.com/s-maheshbabu/silent-alexa/pull/1#discussion_r172036839"},"pull_request":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1"}},"in_reply_to_id":172035439},"pull_request":{"url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1","id":171539510,"html_url":"https://github.com/s-maheshbabu/silent-alexa/pull/1","diff_url":"https://github.com/s-maheshbabu/silent-alexa/pull/1.diff","patch_url":"https://github.com/s-maheshbabu/silent-alexa/pull/1.patch","issue_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues/1","number":1,"state":"open","locked":false,"title":"Added LoginWithAmazon feature","user":{"login":"gootla-manasa","id":5608915,"avatar_url":"https://avatars1.githubusercontent.com/u/5608915?v=4","gravatar_id":"","url":"https://api.github.com/users/gootla-manasa","html_url":"https://github.com/gootla-manasa","followers_url":"https://api.github.com/users/gootla-manasa/followers","following_url":"https://api.github.com/users/gootla-manasa/following{/other_user}","gists_url":"https://api.github.com/users/gootla-manasa/gists{/gist_id}","starred_url":"https://api.github.com/users/gootla-manasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gootla-manasa/subscriptions","organizations_url":"https://api.github.com/users/gootla-manasa/orgs","repos_url":"https://api.github.com/users/gootla-manasa/repos","events_url":"https://api.github.com/users/gootla-manasa/events{/privacy}","received_events_url":"https://api.github.com/users/gootla-manasa/received_events","type":"User","site_admin":false},"body":"This change introduces `LoginWithAmazon` support which provides `access_token` to the client app, using `Implicit Grant`. ","created_at":"2018-02-27T01:28:28Z","updated_at":"2018-03-04T04:27:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c0d0e3032227a7dc44fc697768a327294c130d2","assignee":{"login":"gootla-manasa","id":5608915,"avatar_url":"https://avatars1.githubusercontent.com/u/5608915?v=4","gravatar_id":"","url":"https://api.github.com/users/gootla-manasa","html_url":"https://github.com/gootla-manasa","followers_url":"https://api.github.com/users/gootla-manasa/followers","following_url":"https://api.github.com/users/gootla-manasa/following{/other_user}","gists_url":"https://api.github.com/users/gootla-manasa/gists{/gist_id}","starred_url":"https://api.github.com/users/gootla-manasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gootla-manasa/subscriptions","organizations_url":"https://api.github.com/users/gootla-manasa/orgs","repos_url":"https://api.github.com/users/gootla-manasa/repos","events_url":"https://api.github.com/users/gootla-manasa/events{/privacy}","received_events_url":"https://api.github.com/users/gootla-manasa/received_events","type":"User","site_admin":false},"assignees":[{"login":"gootla-manasa","id":5608915,"avatar_url":"https://avatars1.githubusercontent.com/u/5608915?v=4","gravatar_id":"","url":"https://api.github.com/users/gootla-manasa","html_url":"https://github.com/gootla-manasa","followers_url":"https://api.github.com/users/gootla-manasa/followers","following_url":"https://api.github.com/users/gootla-manasa/following{/other_user}","gists_url":"https://api.github.com/users/gootla-manasa/gists{/gist_id}","starred_url":"https://api.github.com/users/gootla-manasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gootla-manasa/subscriptions","organizations_url":"https://api.github.com/users/gootla-manasa/orgs","repos_url":"https://api.github.com/users/gootla-manasa/repos","events_url":"https://api.github.com/users/gootla-manasa/events{/privacy}","received_events_url":"https://api.github.com/users/gootla-manasa/received_events","type":"User","site_admin":false},{"login":"s-maheshbabu","id":10920089,"avatar_url":"https://avatars3.githubusercontent.com/u/10920089?v=4","gravatar_id":"","url":"https://api.github.com/users/s-maheshbabu","html_url":"https://github.com/s-maheshbabu","followers_url":"https://api.github.com/users/s-maheshbabu/followers","following_url":"https://api.github.com/users/s-maheshbabu/following{/other_user}","gists_url":"https://api.github.com/users/s-maheshbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/s-maheshbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-maheshbabu/subscriptions","organizations_url":"https://api.github.com/users/s-maheshbabu/orgs","repos_url":"https://api.github.com/users/s-maheshbabu/repos","events_url":"https://api.github.com/users/s-maheshbabu/events{/privacy}","received_events_url":"https://api.github.com/users/s-maheshbabu/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1/commits","review_comments_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1/comments","review_comment_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues/1/comments","statuses_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/statuses/e227c64c687dfb22e9e1d7fb6a2bc4b9a12b8d84","head":{"label":"gootla-manasa:master","ref":"master","sha":"e227c64c687dfb22e9e1d7fb6a2bc4b9a12b8d84","user":{"login":"gootla-manasa","id":5608915,"avatar_url":"https://avatars1.githubusercontent.com/u/5608915?v=4","gravatar_id":"","url":"https://api.github.com/users/gootla-manasa","html_url":"https://github.com/gootla-manasa","followers_url":"https://api.github.com/users/gootla-manasa/followers","following_url":"https://api.github.com/users/gootla-manasa/following{/other_user}","gists_url":"https://api.github.com/users/gootla-manasa/gists{/gist_id}","starred_url":"https://api.github.com/users/gootla-manasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gootla-manasa/subscriptions","organizations_url":"https://api.github.com/users/gootla-manasa/orgs","repos_url":"https://api.github.com/users/gootla-manasa/repos","events_url":"https://api.github.com/users/gootla-manasa/events{/privacy}","received_events_url":"https://api.github.com/users/gootla-manasa/received_events","type":"User","site_admin":false},"repo":{"id":123052161,"name":"silent-alexa","full_name":"gootla-manasa/silent-alexa","owner":{"login":"gootla-manasa","id":5608915,"avatar_url":"https://avatars1.githubusercontent.com/u/5608915?v=4","gravatar_id":"","url":"https://api.github.com/users/gootla-manasa","html_url":"https://github.com/gootla-manasa","followers_url":"https://api.github.com/users/gootla-manasa/followers","following_url":"https://api.github.com/users/gootla-manasa/following{/other_user}","gists_url":"https://api.github.com/users/gootla-manasa/gists{/gist_id}","starred_url":"https://api.github.com/users/gootla-manasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gootla-manasa/subscriptions","organizations_url":"https://api.github.com/users/gootla-manasa/orgs","repos_url":"https://api.github.com/users/gootla-manasa/repos","events_url":"https://api.github.com/users/gootla-manasa/events{/privacy}","received_events_url":"https://api.github.com/users/gootla-manasa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gootla-manasa/silent-alexa","description":"A text based interface to Amazon Alexa","fork":true,"url":"https://api.github.com/repos/gootla-manasa/silent-alexa","forks_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/forks","keys_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/teams","hooks_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/hooks","issue_events_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/issues/events{/number}","events_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/events","assignees_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/assignees{/user}","branches_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/branches{/branch}","tags_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/tags","blobs_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/git/refs{/sha}","trees_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/statuses/{sha}","languages_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/languages","stargazers_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/stargazers","contributors_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/contributors","subscribers_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/subscribers","subscription_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/subscription","commits_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/commits{/sha}","git_commits_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/git/commits{/sha}","comments_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/comments{/number}","issue_comment_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/issues/comments{/number}","contents_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/contents/{+path}","compare_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/merges","archive_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/downloads","issues_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/issues{/number}","pulls_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/pulls{/number}","milestones_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/milestones{/number}","notifications_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/labels{/name}","releases_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/releases{/id}","deployments_url":"https://api.github.com/repos/gootla-manasa/silent-alexa/deployments","created_at":"2018-02-27T01:03:20Z","updated_at":"2018-02-27T01:03:22Z","pushed_at":"2018-03-03T19:08:02Z","git_url":"git://github.com/gootla-manasa/silent-alexa.git","ssh_url":"git@github.com:gootla-manasa/silent-alexa.git","clone_url":"https://github.com/gootla-manasa/silent-alexa.git","svn_url":"https://github.com/gootla-manasa/silent-alexa","homepage":null,"size":146,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"s-maheshbabu:master","ref":"master","sha":"064b8739807869d13776fafc1643ce9d83b42b58","user":{"login":"s-maheshbabu","id":10920089,"avatar_url":"https://avatars3.githubusercontent.com/u/10920089?v=4","gravatar_id":"","url":"https://api.github.com/users/s-maheshbabu","html_url":"https://github.com/s-maheshbabu","followers_url":"https://api.github.com/users/s-maheshbabu/followers","following_url":"https://api.github.com/users/s-maheshbabu/following{/other_user}","gists_url":"https://api.github.com/users/s-maheshbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/s-maheshbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-maheshbabu/subscriptions","organizations_url":"https://api.github.com/users/s-maheshbabu/orgs","repos_url":"https://api.github.com/users/s-maheshbabu/repos","events_url":"https://api.github.com/users/s-maheshbabu/events{/privacy}","received_events_url":"https://api.github.com/users/s-maheshbabu/received_events","type":"User","site_admin":false},"repo":{"id":122009781,"name":"silent-alexa","full_name":"s-maheshbabu/silent-alexa","owner":{"login":"s-maheshbabu","id":10920089,"avatar_url":"https://avatars3.githubusercontent.com/u/10920089?v=4","gravatar_id":"","url":"https://api.github.com/users/s-maheshbabu","html_url":"https://github.com/s-maheshbabu","followers_url":"https://api.github.com/users/s-maheshbabu/followers","following_url":"https://api.github.com/users/s-maheshbabu/following{/other_user}","gists_url":"https://api.github.com/users/s-maheshbabu/gists{/gist_id}","starred_url":"https://api.github.com/users/s-maheshbabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-maheshbabu/subscriptions","organizations_url":"https://api.github.com/users/s-maheshbabu/orgs","repos_url":"https://api.github.com/users/s-maheshbabu/repos","events_url":"https://api.github.com/users/s-maheshbabu/events{/privacy}","received_events_url":"https://api.github.com/users/s-maheshbabu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s-maheshbabu/silent-alexa","description":"A text based interface to Amazon Alexa","fork":false,"url":"https://api.github.com/repos/s-maheshbabu/silent-alexa","forks_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/forks","keys_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/teams","hooks_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/hooks","issue_events_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues/events{/number}","events_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/events","assignees_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/assignees{/user}","branches_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/branches{/branch}","tags_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/tags","blobs_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/git/refs{/sha}","trees_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/statuses/{sha}","languages_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/languages","stargazers_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/stargazers","contributors_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/contributors","subscribers_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/subscribers","subscription_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/subscription","commits_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/commits{/sha}","git_commits_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/git/commits{/sha}","comments_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/comments{/number}","issue_comment_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues/comments{/number}","contents_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/contents/{+path}","compare_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/merges","archive_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/downloads","issues_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues{/number}","pulls_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls{/number}","milestones_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/milestones{/number}","notifications_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/labels{/name}","releases_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/releases{/id}","deployments_url":"https://api.github.com/repos/s-maheshbabu/silent-alexa/deployments","created_at":"2018-02-19T02:09:22Z","updated_at":"2018-02-19T02:09:58Z","pushed_at":"2018-03-03T19:08:03Z","git_url":"git://github.com/s-maheshbabu/silent-alexa.git","ssh_url":"git@github.com:s-maheshbabu/silent-alexa.git","clone_url":"https://github.com/s-maheshbabu/silent-alexa.git","svn_url":"https://github.com/s-maheshbabu/silent-alexa","homepage":null,"size":139,"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":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1"},"html":{"href":"https://github.com/s-maheshbabu/silent-alexa/pull/1"},"issue":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues/1"},"comments":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/s-maheshbabu/silent-alexa/statuses/e227c64c687dfb22e9e1d7fb6a2bc4b9a12b8d84"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gootla-manasa"}}