{"action":"created","comment":{"url":"https://api.github.com/repos/wolox-training/df-rails/pulls/comments/53629175","id":53629175,"diff_hunk":"@@ -0,0 +1,29 @@\n+class OmniauthCallbacksController < Devise::OmniauthCallbacksController\n+  def facebook\n+    generic_callback( 'facebook' )\n+  end\n+\n+  def generic_callback( provider )\n+    @identity = Identity.find_for_oauth env[\"omniauth.auth\"]\n+\n+    @user = @identity.user || current_user\n+    if @user.nil?\n+      @user = User.create( email: @identity.email || \"\" )","path":"blog/app/controllers/omniauth_callbacks_controller.rb","position":11,"original_position":11,"commit_id":"d6c5f9011bf28cbdddbf358cf2d7e9f691f49b5b","original_commit_id":"d6c5f9011bf28cbdddbf358cf2d7e9f691f49b5b","user":{"login":"epintos","id":1047402,"avatar_url":"https://avatars.githubusercontent.com/u/1047402?v=3","gravatar_id":"","url":"https://api.github.com/users/epintos","html_url":"https://github.com/epintos","followers_url":"https://api.github.com/users/epintos/followers","following_url":"https://api.github.com/users/epintos/following{/other_user}","gists_url":"https://api.github.com/users/epintos/gists{/gist_id}","starred_url":"https://api.github.com/users/epintos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epintos/subscriptions","organizations_url":"https://api.github.com/users/epintos/orgs","repos_url":"https://api.github.com/users/epintos/repos","events_url":"https://api.github.com/users/epintos/events{/privacy}","received_events_url":"https://api.github.com/users/epintos/received_events","type":"User","site_admin":false},"body":"You could leave @identity.email only and it will set a nil email","created_at":"2016-02-22T14:12:41Z","updated_at":"2016-02-22T14:12:41Z","html_url":"https://github.com/wolox-training/df-rails/pull/4#discussion_r53629175","pull_request_url":"https://api.github.com/repos/wolox-training/df-rails/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/wolox-training/df-rails/pulls/comments/53629175"},"html":{"href":"https://github.com/wolox-training/df-rails/pull/4#discussion_r53629175"},"pull_request":{"href":"https://api.github.com/repos/wolox-training/df-rails/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/wolox-training/df-rails/pulls/4","id":59983895,"html_url":"https://github.com/wolox-training/df-rails/pull/4","diff_url":"https://github.com/wolox-training/df-rails/pull/4.diff","patch_url":"https://github.com/wolox-training/df-rails/pull/4.patch","issue_url":"https://api.github.com/repos/wolox-training/df-rails/issues/4","number":4,"state":"open","locked":false,"title":"SignIn via Facebook integrated with devise","user":{"login":"Enanodr","id":7190665,"avatar_url":"https://avatars.githubusercontent.com/u/7190665?v=3","gravatar_id":"","url":"https://api.github.com/users/Enanodr","html_url":"https://github.com/Enanodr","followers_url":"https://api.github.com/users/Enanodr/followers","following_url":"https://api.github.com/users/Enanodr/following{/other_user}","gists_url":"https://api.github.com/users/Enanodr/gists{/gist_id}","starred_url":"https://api.github.com/users/Enanodr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Enanodr/subscriptions","organizations_url":"https://api.github.com/users/Enanodr/orgs","repos_url":"https://api.github.com/users/Enanodr/repos","events_url":"https://api.github.com/users/Enanodr/events{/privacy}","received_events_url":"https://api.github.com/users/Enanodr/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nSing in via facebook functionality\r\n\r\n## TrelloCard\r\nhttps://trello.com/c/2yj4fPKX \r\n\r\n## Screenshots\r\n### Sign in from facebook link\r\n![image](https://cloud.githubusercontent.com/assets/7190665/13184100/c1848fb2-d718-11e5-95ec-18ed49fa2c54.png)\r\n","created_at":"2016-02-19T17:55:44Z","updated_at":"2016-02-22T14:12:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d0b278bd29f1faad5cfaa024ecce61650fc18b8","assignee":{"login":"epintos","id":1047402,"avatar_url":"https://avatars.githubusercontent.com/u/1047402?v=3","gravatar_id":"","url":"https://api.github.com/users/epintos","html_url":"https://github.com/epintos","followers_url":"https://api.github.com/users/epintos/followers","following_url":"https://api.github.com/users/epintos/following{/other_user}","gists_url":"https://api.github.com/users/epintos/gists{/gist_id}","starred_url":"https://api.github.com/users/epintos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/epintos/subscriptions","organizations_url":"https://api.github.com/users/epintos/orgs","repos_url":"https://api.github.com/users/epintos/repos","events_url":"https://api.github.com/users/epintos/events{/privacy}","received_events_url":"https://api.github.com/users/epintos/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/wolox-training/df-rails/pulls/4/commits","review_comments_url":"https://api.github.com/repos/wolox-training/df-rails/pulls/4/comments","review_comment_url":"https://api.github.com/repos/wolox-training/df-rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wolox-training/df-rails/issues/4/comments","statuses_url":"https://api.github.com/repos/wolox-training/df-rails/statuses/d6c5f9011bf28cbdddbf358cf2d7e9f691f49b5b","head":{"label":"wolox-training:facebook","ref":"facebook","sha":"d6c5f9011bf28cbdddbf358cf2d7e9f691f49b5b","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":51615793,"name":"df-rails","full_name":"wolox-training/df-rails","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/df-rails","description":"Training Diego","fork":false,"url":"https://api.github.com/repos/wolox-training/df-rails","forks_url":"https://api.github.com/repos/wolox-training/df-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/df-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/df-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/df-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/df-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/df-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/df-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/df-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/df-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/df-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/df-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/df-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/df-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/df-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/df-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/df-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/df-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/df-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/df-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/df-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/df-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/df-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/df-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/df-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/df-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/df-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/df-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/df-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/df-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/df-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/df-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/df-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/df-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/df-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/df-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/df-rails/deployments","created_at":"2016-02-12T20:54:24Z","updated_at":"2016-02-12T20:54:24Z","pushed_at":"2016-02-19T19:48:31Z","git_url":"git://github.com/wolox-training/df-rails.git","ssh_url":"git@github.com:wolox-training/df-rails.git","clone_url":"https://github.com/wolox-training/df-rails.git","svn_url":"https://github.com/wolox-training/df-rails","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"wolox-training:device","ref":"device","sha":"49f5672aa0221e543f8682cb3dd2cc613f32eca9","user":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"repo":{"id":51615793,"name":"df-rails","full_name":"wolox-training/df-rails","owner":{"login":"wolox-training","id":14113351,"avatar_url":"https://avatars.githubusercontent.com/u/14113351?v=3","gravatar_id":"","url":"https://api.github.com/users/wolox-training","html_url":"https://github.com/wolox-training","followers_url":"https://api.github.com/users/wolox-training/followers","following_url":"https://api.github.com/users/wolox-training/following{/other_user}","gists_url":"https://api.github.com/users/wolox-training/gists{/gist_id}","starred_url":"https://api.github.com/users/wolox-training/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolox-training/subscriptions","organizations_url":"https://api.github.com/users/wolox-training/orgs","repos_url":"https://api.github.com/users/wolox-training/repos","events_url":"https://api.github.com/users/wolox-training/events{/privacy}","received_events_url":"https://api.github.com/users/wolox-training/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wolox-training/df-rails","description":"Training Diego","fork":false,"url":"https://api.github.com/repos/wolox-training/df-rails","forks_url":"https://api.github.com/repos/wolox-training/df-rails/forks","keys_url":"https://api.github.com/repos/wolox-training/df-rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wolox-training/df-rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wolox-training/df-rails/teams","hooks_url":"https://api.github.com/repos/wolox-training/df-rails/hooks","issue_events_url":"https://api.github.com/repos/wolox-training/df-rails/issues/events{/number}","events_url":"https://api.github.com/repos/wolox-training/df-rails/events","assignees_url":"https://api.github.com/repos/wolox-training/df-rails/assignees{/user}","branches_url":"https://api.github.com/repos/wolox-training/df-rails/branches{/branch}","tags_url":"https://api.github.com/repos/wolox-training/df-rails/tags","blobs_url":"https://api.github.com/repos/wolox-training/df-rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wolox-training/df-rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wolox-training/df-rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/wolox-training/df-rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wolox-training/df-rails/statuses/{sha}","languages_url":"https://api.github.com/repos/wolox-training/df-rails/languages","stargazers_url":"https://api.github.com/repos/wolox-training/df-rails/stargazers","contributors_url":"https://api.github.com/repos/wolox-training/df-rails/contributors","subscribers_url":"https://api.github.com/repos/wolox-training/df-rails/subscribers","subscription_url":"https://api.github.com/repos/wolox-training/df-rails/subscription","commits_url":"https://api.github.com/repos/wolox-training/df-rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/wolox-training/df-rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/wolox-training/df-rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/wolox-training/df-rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/wolox-training/df-rails/contents/{+path}","compare_url":"https://api.github.com/repos/wolox-training/df-rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wolox-training/df-rails/merges","archive_url":"https://api.github.com/repos/wolox-training/df-rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wolox-training/df-rails/downloads","issues_url":"https://api.github.com/repos/wolox-training/df-rails/issues{/number}","pulls_url":"https://api.github.com/repos/wolox-training/df-rails/pulls{/number}","milestones_url":"https://api.github.com/repos/wolox-training/df-rails/milestones{/number}","notifications_url":"https://api.github.com/repos/wolox-training/df-rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wolox-training/df-rails/labels{/name}","releases_url":"https://api.github.com/repos/wolox-training/df-rails/releases{/id}","deployments_url":"https://api.github.com/repos/wolox-training/df-rails/deployments","created_at":"2016-02-12T20:54:24Z","updated_at":"2016-02-12T20:54:24Z","pushed_at":"2016-02-19T19:48:31Z","git_url":"git://github.com/wolox-training/df-rails.git","ssh_url":"git@github.com:wolox-training/df-rails.git","clone_url":"https://github.com/wolox-training/df-rails.git","svn_url":"https://github.com/wolox-training/df-rails","homepage":null,"size":65,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wolox-training/df-rails/pulls/4"},"html":{"href":"https://github.com/wolox-training/df-rails/pull/4"},"issue":{"href":"https://api.github.com/repos/wolox-training/df-rails/issues/4"},"comments":{"href":"https://api.github.com/repos/wolox-training/df-rails/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/wolox-training/df-rails/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/wolox-training/df-rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wolox-training/df-rails/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/wolox-training/df-rails/statuses/d6c5f9011bf28cbdddbf358cf2d7e9f691f49b5b"}}}}