{"action":"created","comment":{"url":"https://api.github.com/repos/emcasa/frontend/pulls/comments/215754364","pull_request_review_id":153091887,"id":215754364,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTc1NDM2NA==","diff_hunk":"@@ -0,0 +1,116 @@\n+import {Component, Fragment} from 'react'\n+import PropTypes from 'prop-types'\n+import {Mutation} from 'react-apollo'\n+import {SIGN_IN_ACCOUNT_KIT} from 'graphql/user/mutations'\n+\n+class AccountKit extends Component {\n+  state = {\n+    canSignIn: false,\n+    signingIn: false\n+  }\n+  setAccountKit = () => (window.AccountKit_OnInteractive = this.onLoad)\n+\n+  componentDidMount() {\n+    if (!window.AccountKit) {\n+      const {language} = this.props\n+      const tag = document.createElement('script')\n+      tag.setAttribute('src', `https://sdk.accountkit.com/${language}/sdk.js`)\n+      tag.setAttribute('id', 'account-kit')\n+      tag.setAttribute('type', 'text/javascript')\n+      tag.onload = this.setAccountKit\n+      document.head.appendChild(tag)\n+    }\n+  }\n+\n+  onLoad = () => {\n+    const {appId, csrf, version} = this.props\n+    window.AccountKit.init({\n+      appId,\n+      state: csrf,\n+      version,\n+      fbAppEventsEnabled: true,\n+      debug: true\n+    })\n+  }\n+\n+  signIn = () => {\n+    const {loginType, countryCode, phoneNumber, emailAddress} = this.props\n+\n+    const options = {}","path":"components/shared/Auth/AccountKit/index.js","position":39,"original_position":39,"commit_id":"2db5122f18f949602934efd21cbd038d61ff74a0","original_commit_id":"7141da9dfa0289c3cbcc58c67bf0ad299020935a","user":{"login":"nathanqueija","id":8295374,"node_id":"MDQ6VXNlcjgyOTUzNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8295374?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanqueija","html_url":"https://github.com/nathanqueija","followers_url":"https://api.github.com/users/nathanqueija/followers","following_url":"https://api.github.com/users/nathanqueija/following{/other_user}","gists_url":"https://api.github.com/users/nathanqueija/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanqueija/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanqueija/subscriptions","organizations_url":"https://api.github.com/users/nathanqueija/orgs","repos_url":"https://api.github.com/users/nathanqueija/repos","events_url":"https://api.github.com/users/nathanqueija/events{/privacy}","received_events_url":"https://api.github.com/users/nathanqueija/received_events","type":"User","site_admin":false},"body":"Nice, @gabriel-laet . I did not know this option. Done.","created_at":"2018-09-06T19:46:59Z","updated_at":"2018-09-06T19:46:59Z","html_url":"https://github.com/emcasa/frontend/pull/410#discussion_r215754364","pull_request_url":"https://api.github.com/repos/emcasa/frontend/pulls/410","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/emcasa/frontend/pulls/comments/215754364"},"html":{"href":"https://github.com/emcasa/frontend/pull/410#discussion_r215754364"},"pull_request":{"href":"https://api.github.com/repos/emcasa/frontend/pulls/410"}},"in_reply_to_id":215750995},"pull_request":{"url":"https://api.github.com/repos/emcasa/frontend/pulls/410","id":213725760,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNzI1NzYw","html_url":"https://github.com/emcasa/frontend/pull/410","diff_url":"https://github.com/emcasa/frontend/pull/410.diff","patch_url":"https://github.com/emcasa/frontend/pull/410.patch","issue_url":"https://api.github.com/repos/emcasa/frontend/issues/410","number":410,"state":"open","locked":false,"title":"Account kit","user":{"login":"nathanqueija","id":8295374,"node_id":"MDQ6VXNlcjgyOTUzNzQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8295374?v=4","gravatar_id":"","url":"https://api.github.com/users/nathanqueija","html_url":"https://github.com/nathanqueija","followers_url":"https://api.github.com/users/nathanqueija/followers","following_url":"https://api.github.com/users/nathanqueija/following{/other_user}","gists_url":"https://api.github.com/users/nathanqueija/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanqueija/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanqueija/subscriptions","organizations_url":"https://api.github.com/users/nathanqueija/orgs","repos_url":"https://api.github.com/users/nathanqueija/repos","events_url":"https://api.github.com/users/nathanqueija/events{/privacy}","received_events_url":"https://api.github.com/users/nathanqueija/received_events","type":"User","site_admin":false},"body":"https://www.pivotaltracker.com/story/show/160323605\r\n\r\nThis PR sets up Account Kit configuration allowing user to sign in with mobile number.\r\n\r\nTo test you can navigate to `/account-kit` route\r\nPlease, keep in mind that for this example to work you need to provide the **2** following environment variables when starting the application: `FACEBOOK_APP_ID` and `ACCOUNT_KIT_APP_SECRET`","created_at":"2018-09-06T19:30:53Z","updated_at":"2018-09-06T19:46:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"184e6780bcc400b9d24d5537a6e776ba58c004f8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/emcasa/frontend/pulls/410/commits","review_comments_url":"https://api.github.com/repos/emcasa/frontend/pulls/410/comments","review_comment_url":"https://api.github.com/repos/emcasa/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emcasa/frontend/issues/410/comments","statuses_url":"https://api.github.com/repos/emcasa/frontend/statuses/2db5122f18f949602934efd21cbd038d61ff74a0","head":{"label":"emcasa:account-kit","ref":"account-kit","sha":"2db5122f18f949602934efd21cbd038d61ff74a0","user":{"login":"emcasa","id":35232391,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MjMyMzkx","avatar_url":"https://avatars2.githubusercontent.com/u/35232391?v=4","gravatar_id":"","url":"https://api.github.com/users/emcasa","html_url":"https://github.com/emcasa","followers_url":"https://api.github.com/users/emcasa/followers","following_url":"https://api.github.com/users/emcasa/following{/other_user}","gists_url":"https://api.github.com/users/emcasa/gists{/gist_id}","starred_url":"https://api.github.com/users/emcasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcasa/subscriptions","organizations_url":"https://api.github.com/users/emcasa/orgs","repos_url":"https://api.github.com/users/emcasa/repos","events_url":"https://api.github.com/users/emcasa/events{/privacy}","received_events_url":"https://api.github.com/users/emcasa/received_events","type":"Organization","site_admin":false},"repo":{"id":95909196,"node_id":"MDEwOlJlcG9zaXRvcnk5NTkwOTE5Ng==","name":"frontend","full_name":"emcasa/frontend","owner":{"login":"emcasa","id":35232391,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MjMyMzkx","avatar_url":"https://avatars2.githubusercontent.com/u/35232391?v=4","gravatar_id":"","url":"https://api.github.com/users/emcasa","html_url":"https://github.com/emcasa","followers_url":"https://api.github.com/users/emcasa/followers","following_url":"https://api.github.com/users/emcasa/following{/other_user}","gists_url":"https://api.github.com/users/emcasa/gists{/gist_id}","starred_url":"https://api.github.com/users/emcasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcasa/subscriptions","organizations_url":"https://api.github.com/users/emcasa/orgs","repos_url":"https://api.github.com/users/emcasa/repos","events_url":"https://api.github.com/users/emcasa/events{/privacy}","received_events_url":"https://api.github.com/users/emcasa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emcasa/frontend","description":"EmCasa Web Client","fork":false,"url":"https://api.github.com/repos/emcasa/frontend","forks_url":"https://api.github.com/repos/emcasa/frontend/forks","keys_url":"https://api.github.com/repos/emcasa/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emcasa/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emcasa/frontend/teams","hooks_url":"https://api.github.com/repos/emcasa/frontend/hooks","issue_events_url":"https://api.github.com/repos/emcasa/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/emcasa/frontend/events","assignees_url":"https://api.github.com/repos/emcasa/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/emcasa/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/emcasa/frontend/tags","blobs_url":"https://api.github.com/repos/emcasa/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emcasa/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emcasa/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/emcasa/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emcasa/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/emcasa/frontend/languages","stargazers_url":"https://api.github.com/repos/emcasa/frontend/stargazers","contributors_url":"https://api.github.com/repos/emcasa/frontend/contributors","subscribers_url":"https://api.github.com/repos/emcasa/frontend/subscribers","subscription_url":"https://api.github.com/repos/emcasa/frontend/subscription","commits_url":"https://api.github.com/repos/emcasa/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/emcasa/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/emcasa/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/emcasa/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/emcasa/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/emcasa/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emcasa/frontend/merges","archive_url":"https://api.github.com/repos/emcasa/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emcasa/frontend/downloads","issues_url":"https://api.github.com/repos/emcasa/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/emcasa/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/emcasa/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/emcasa/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emcasa/frontend/labels{/name}","releases_url":"https://api.github.com/repos/emcasa/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/emcasa/frontend/deployments","created_at":"2017-06-30T17:15:58Z","updated_at":"2018-09-06T15:53:33Z","pushed_at":"2018-09-06T19:46:18Z","git_url":"git://github.com/emcasa/frontend.git","ssh_url":"git@github.com:emcasa/frontend.git","clone_url":"https://github.com/emcasa/frontend.git","svn_url":"https://github.com/emcasa/frontend","homepage":"https://www.emcasa.com","size":14965,"stargazers_count":27,"watchers_count":27,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":1,"watchers":27,"default_branch":"master"}},"base":{"label":"emcasa:master","ref":"master","sha":"b7259db581563dd428f57eb846da09243f66eb2f","user":{"login":"emcasa","id":35232391,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MjMyMzkx","avatar_url":"https://avatars2.githubusercontent.com/u/35232391?v=4","gravatar_id":"","url":"https://api.github.com/users/emcasa","html_url":"https://github.com/emcasa","followers_url":"https://api.github.com/users/emcasa/followers","following_url":"https://api.github.com/users/emcasa/following{/other_user}","gists_url":"https://api.github.com/users/emcasa/gists{/gist_id}","starred_url":"https://api.github.com/users/emcasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcasa/subscriptions","organizations_url":"https://api.github.com/users/emcasa/orgs","repos_url":"https://api.github.com/users/emcasa/repos","events_url":"https://api.github.com/users/emcasa/events{/privacy}","received_events_url":"https://api.github.com/users/emcasa/received_events","type":"Organization","site_admin":false},"repo":{"id":95909196,"node_id":"MDEwOlJlcG9zaXRvcnk5NTkwOTE5Ng==","name":"frontend","full_name":"emcasa/frontend","owner":{"login":"emcasa","id":35232391,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MjMyMzkx","avatar_url":"https://avatars2.githubusercontent.com/u/35232391?v=4","gravatar_id":"","url":"https://api.github.com/users/emcasa","html_url":"https://github.com/emcasa","followers_url":"https://api.github.com/users/emcasa/followers","following_url":"https://api.github.com/users/emcasa/following{/other_user}","gists_url":"https://api.github.com/users/emcasa/gists{/gist_id}","starred_url":"https://api.github.com/users/emcasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcasa/subscriptions","organizations_url":"https://api.github.com/users/emcasa/orgs","repos_url":"https://api.github.com/users/emcasa/repos","events_url":"https://api.github.com/users/emcasa/events{/privacy}","received_events_url":"https://api.github.com/users/emcasa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emcasa/frontend","description":"EmCasa Web Client","fork":false,"url":"https://api.github.com/repos/emcasa/frontend","forks_url":"https://api.github.com/repos/emcasa/frontend/forks","keys_url":"https://api.github.com/repos/emcasa/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emcasa/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emcasa/frontend/teams","hooks_url":"https://api.github.com/repos/emcasa/frontend/hooks","issue_events_url":"https://api.github.com/repos/emcasa/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/emcasa/frontend/events","assignees_url":"https://api.github.com/repos/emcasa/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/emcasa/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/emcasa/frontend/tags","blobs_url":"https://api.github.com/repos/emcasa/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emcasa/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emcasa/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/emcasa/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emcasa/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/emcasa/frontend/languages","stargazers_url":"https://api.github.com/repos/emcasa/frontend/stargazers","contributors_url":"https://api.github.com/repos/emcasa/frontend/contributors","subscribers_url":"https://api.github.com/repos/emcasa/frontend/subscribers","subscription_url":"https://api.github.com/repos/emcasa/frontend/subscription","commits_url":"https://api.github.com/repos/emcasa/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/emcasa/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/emcasa/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/emcasa/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/emcasa/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/emcasa/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emcasa/frontend/merges","archive_url":"https://api.github.com/repos/emcasa/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emcasa/frontend/downloads","issues_url":"https://api.github.com/repos/emcasa/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/emcasa/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/emcasa/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/emcasa/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emcasa/frontend/labels{/name}","releases_url":"https://api.github.com/repos/emcasa/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/emcasa/frontend/deployments","created_at":"2017-06-30T17:15:58Z","updated_at":"2018-09-06T15:53:33Z","pushed_at":"2018-09-06T19:46:18Z","git_url":"git://github.com/emcasa/frontend.git","ssh_url":"git@github.com:emcasa/frontend.git","clone_url":"https://github.com/emcasa/frontend.git","svn_url":"https://github.com/emcasa/frontend","homepage":"https://www.emcasa.com","size":14965,"stargazers_count":27,"watchers_count":27,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":1,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emcasa/frontend/pulls/410"},"html":{"href":"https://github.com/emcasa/frontend/pull/410"},"issue":{"href":"https://api.github.com/repos/emcasa/frontend/issues/410"},"comments":{"href":"https://api.github.com/repos/emcasa/frontend/issues/410/comments"},"review_comments":{"href":"https://api.github.com/repos/emcasa/frontend/pulls/410/comments"},"review_comment":{"href":"https://api.github.com/repos/emcasa/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emcasa/frontend/pulls/410/commits"},"statuses":{"href":"https://api.github.com/repos/emcasa/frontend/statuses/2db5122f18f949602934efd21cbd038d61ff74a0"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nathanqueija"}}