{"action":"created","comment":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/186296903","pull_request_review_id":117849532,"id":186296903,"diff_hunk":"@@ -5,10 +5,51 @@\n #   the COPYRIGHT file.\n \n class SessionsController < Devise::SessionsController\n+  before_action :authenticate_with_2fa, only: [:create]","path":"app/controllers/sessions_controller.rb","position":4,"original_position":4,"commit_id":"a377f11187b84e68719d968af1ab0874d13d0f9e","original_commit_id":"91e0bc2d37f2ee77f7821fcede50e50216616b1c","user":{"login":"lislis","id":1006478,"avatar_url":"https://avatars2.githubusercontent.com/u/1006478?v=4","gravatar_id":"","url":"https://api.github.com/users/lislis","html_url":"https://github.com/lislis","followers_url":"https://api.github.com/users/lislis/followers","following_url":"https://api.github.com/users/lislis/following{/other_user}","gists_url":"https://api.github.com/users/lislis/gists{/gist_id}","starred_url":"https://api.github.com/users/lislis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lislis/subscriptions","organizations_url":"https://api.github.com/users/lislis/orgs","repos_url":"https://api.github.com/users/lislis/repos","events_url":"https://api.github.com/users/lislis/events{/privacy}","received_events_url":"https://api.github.com/users/lislis/received_events","type":"User","site_admin":false},"body":"This one is tricky, `#create` comes from devise but I need to run the before action if a user has 2fa enabled","created_at":"2018-05-06T17:13:33Z","updated_at":"2018-05-06T17:13:34Z","html_url":"https://github.com/diaspora/diaspora/pull/7751#discussion_r186296903","pull_request_url":"https://api.github.com/repos/diaspora/diaspora/pulls/7751","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments/186296903"},"html":{"href":"https://github.com/diaspora/diaspora/pull/7751#discussion_r186296903"},"pull_request":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7751"}},"in_reply_to_id":182265626},"pull_request":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/7751","id":177535870,"html_url":"https://github.com/diaspora/diaspora/pull/7751","diff_url":"https://github.com/diaspora/diaspora/pull/7751.diff","patch_url":"https://github.com/diaspora/diaspora/pull/7751.patch","issue_url":"https://api.github.com/repos/diaspora/diaspora/issues/7751","number":7751,"state":"open","locked":false,"title":"Two factor authentication","user":{"login":"lislis","id":1006478,"avatar_url":"https://avatars2.githubusercontent.com/u/1006478?v=4","gravatar_id":"","url":"https://api.github.com/users/lislis","html_url":"https://github.com/lislis","followers_url":"https://api.github.com/users/lislis/followers","following_url":"https://api.github.com/users/lislis/following{/other_user}","gists_url":"https://api.github.com/users/lislis/gists{/gist_id}","starred_url":"https://api.github.com/users/lislis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lislis/subscriptions","organizations_url":"https://api.github.com/users/lislis/orgs","repos_url":"https://api.github.com/users/lislis/repos","events_url":"https://api.github.com/users/lislis/events{/privacy}","received_events_url":"https://api.github.com/users/lislis/received_events","type":"User","site_admin":false},"body":"Hey there!\r\nThis is my attempt to implement 2fa, ticket #4299\r\n\r\nI know, there are no tests (:see_no_evil:), all strings are hardcoded, and the UI is far from 'done' but I'm at a point where I need some feedback on the general direction.\r\n\r\nSome screenshots:\r\n\r\nNew link on the settings page, 2fa deactivated\r\n![screenshot-2018-3-26 two factor](https://user-images.githubusercontent.com/1006478/37926180-f780b7c4-3136-11e8-839b-4de28c8c17f1.png)\r\n\r\nScan the code and confirm\r\n![screenshot-2018-3-26 two factor 1](https://user-images.githubusercontent.com/1006478/37926181-f79cd90e-3136-11e8-9a98-27d8c198c8e4.png)\r\n\r\nConfirmation and backup codes\r\n![screenshot-2018-3-26 two factor 2](https://user-images.githubusercontent.com/1006478/37926182-f7b84d1a-3136-11e8-9868-dbda615ff68f.png)\r\n\r\nSettings page, 2fa activated\r\n![screenshot-2018-3-26 two factor 3](https://user-images.githubusercontent.com/1006478/37926183-f7d36f50-3136-11e8-8a1f-40c8de5c771a.png)\r\n\r\nAfter sign-in, prompt for token\r\n![screenshot-2018-3-26 diaspora - sign in](https://user-images.githubusercontent.com/1006478/37926179-f761ef7e-3136-11e8-81e9-3bd2aa94d935.png)\r\n\r\n\r\nAnd that is it so far.\r\n\r\nMissing:\r\n- [ ] tests!\r\n- [ ] put copy from templates into translation files\r\n- [ ] fix UI\r\n\r\nand anything else that's missing","created_at":"2018-03-26T18:54:10Z","updated_at":"2018-05-06T17:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"850c80abf8e1b08bc9ae78e4584716e6a6aa756c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/diaspora/diaspora/pulls/7751/commits","review_comments_url":"https://api.github.com/repos/diaspora/diaspora/pulls/7751/comments","review_comment_url":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diaspora/diaspora/issues/7751/comments","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/a377f11187b84e68719d968af1ab0874d13d0f9e","head":{"label":"lislis:4299-2fa","ref":"4299-2fa","sha":"a377f11187b84e68719d968af1ab0874d13d0f9e","user":{"login":"lislis","id":1006478,"avatar_url":"https://avatars2.githubusercontent.com/u/1006478?v=4","gravatar_id":"","url":"https://api.github.com/users/lislis","html_url":"https://github.com/lislis","followers_url":"https://api.github.com/users/lislis/followers","following_url":"https://api.github.com/users/lislis/following{/other_user}","gists_url":"https://api.github.com/users/lislis/gists{/gist_id}","starred_url":"https://api.github.com/users/lislis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lislis/subscriptions","organizations_url":"https://api.github.com/users/lislis/orgs","repos_url":"https://api.github.com/users/lislis/repos","events_url":"https://api.github.com/users/lislis/events{/privacy}","received_events_url":"https://api.github.com/users/lislis/received_events","type":"User","site_admin":false},"repo":{"id":9908507,"name":"diaspora","full_name":"lislis/diaspora","owner":{"login":"lislis","id":1006478,"avatar_url":"https://avatars2.githubusercontent.com/u/1006478?v=4","gravatar_id":"","url":"https://api.github.com/users/lislis","html_url":"https://github.com/lislis","followers_url":"https://api.github.com/users/lislis/followers","following_url":"https://api.github.com/users/lislis/following{/other_user}","gists_url":"https://api.github.com/users/lislis/gists{/gist_id}","starred_url":"https://api.github.com/users/lislis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lislis/subscriptions","organizations_url":"https://api.github.com/users/lislis/orgs","repos_url":"https://api.github.com/users/lislis/repos","events_url":"https://api.github.com/users/lislis/events{/privacy}","received_events_url":"https://api.github.com/users/lislis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lislis/diaspora","description":"Distributed and contextual social networking","fork":true,"url":"https://api.github.com/repos/lislis/diaspora","forks_url":"https://api.github.com/repos/lislis/diaspora/forks","keys_url":"https://api.github.com/repos/lislis/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lislis/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lislis/diaspora/teams","hooks_url":"https://api.github.com/repos/lislis/diaspora/hooks","issue_events_url":"https://api.github.com/repos/lislis/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/lislis/diaspora/events","assignees_url":"https://api.github.com/repos/lislis/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/lislis/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/lislis/diaspora/tags","blobs_url":"https://api.github.com/repos/lislis/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lislis/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lislis/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/lislis/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lislis/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/lislis/diaspora/languages","stargazers_url":"https://api.github.com/repos/lislis/diaspora/stargazers","contributors_url":"https://api.github.com/repos/lislis/diaspora/contributors","subscribers_url":"https://api.github.com/repos/lislis/diaspora/subscribers","subscription_url":"https://api.github.com/repos/lislis/diaspora/subscription","commits_url":"https://api.github.com/repos/lislis/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/lislis/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/lislis/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/lislis/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/lislis/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/lislis/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lislis/diaspora/merges","archive_url":"https://api.github.com/repos/lislis/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lislis/diaspora/downloads","issues_url":"https://api.github.com/repos/lislis/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/lislis/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/lislis/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/lislis/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lislis/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/lislis/diaspora/releases{/id}","deployments_url":"https://api.github.com/repos/lislis/diaspora/deployments","created_at":"2013-05-07T09:32:15Z","updated_at":"2015-03-14T13:00:02Z","pushed_at":"2018-05-06T16:37:49Z","git_url":"git://github.com/lislis/diaspora.git","ssh_url":"git@github.com:lislis/diaspora.git","clone_url":"https://github.com/lislis/diaspora.git","svn_url":"https://github.com/lislis/diaspora","homepage":"http://diaspora.github.com/diaspora","size":104544,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"diaspora:develop","ref":"develop","sha":"2a60cb30a1d852454d34089ad2360787de74bd58","user":{"login":"diaspora","id":293207,"avatar_url":"https://avatars3.githubusercontent.com/u/293207?v=4","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"repo":{"id":911765,"name":"diaspora","full_name":"diaspora/diaspora","owner":{"login":"diaspora","id":293207,"avatar_url":"https://avatars3.githubusercontent.com/u/293207?v=4","gravatar_id":"","url":"https://api.github.com/users/diaspora","html_url":"https://github.com/diaspora","followers_url":"https://api.github.com/users/diaspora/followers","following_url":"https://api.github.com/users/diaspora/following{/other_user}","gists_url":"https://api.github.com/users/diaspora/gists{/gist_id}","starred_url":"https://api.github.com/users/diaspora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diaspora/subscriptions","organizations_url":"https://api.github.com/users/diaspora/orgs","repos_url":"https://api.github.com/users/diaspora/repos","events_url":"https://api.github.com/users/diaspora/events{/privacy}","received_events_url":"https://api.github.com/users/diaspora/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diaspora/diaspora","description":"A privacy-aware, distributed, open source social network.","fork":false,"url":"https://api.github.com/repos/diaspora/diaspora","forks_url":"https://api.github.com/repos/diaspora/diaspora/forks","keys_url":"https://api.github.com/repos/diaspora/diaspora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diaspora/diaspora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diaspora/diaspora/teams","hooks_url":"https://api.github.com/repos/diaspora/diaspora/hooks","issue_events_url":"https://api.github.com/repos/diaspora/diaspora/issues/events{/number}","events_url":"https://api.github.com/repos/diaspora/diaspora/events","assignees_url":"https://api.github.com/repos/diaspora/diaspora/assignees{/user}","branches_url":"https://api.github.com/repos/diaspora/diaspora/branches{/branch}","tags_url":"https://api.github.com/repos/diaspora/diaspora/tags","blobs_url":"https://api.github.com/repos/diaspora/diaspora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diaspora/diaspora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diaspora/diaspora/git/refs{/sha}","trees_url":"https://api.github.com/repos/diaspora/diaspora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diaspora/diaspora/statuses/{sha}","languages_url":"https://api.github.com/repos/diaspora/diaspora/languages","stargazers_url":"https://api.github.com/repos/diaspora/diaspora/stargazers","contributors_url":"https://api.github.com/repos/diaspora/diaspora/contributors","subscribers_url":"https://api.github.com/repos/diaspora/diaspora/subscribers","subscription_url":"https://api.github.com/repos/diaspora/diaspora/subscription","commits_url":"https://api.github.com/repos/diaspora/diaspora/commits{/sha}","git_commits_url":"https://api.github.com/repos/diaspora/diaspora/git/commits{/sha}","comments_url":"https://api.github.com/repos/diaspora/diaspora/comments{/number}","issue_comment_url":"https://api.github.com/repos/diaspora/diaspora/issues/comments{/number}","contents_url":"https://api.github.com/repos/diaspora/diaspora/contents/{+path}","compare_url":"https://api.github.com/repos/diaspora/diaspora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diaspora/diaspora/merges","archive_url":"https://api.github.com/repos/diaspora/diaspora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diaspora/diaspora/downloads","issues_url":"https://api.github.com/repos/diaspora/diaspora/issues{/number}","pulls_url":"https://api.github.com/repos/diaspora/diaspora/pulls{/number}","milestones_url":"https://api.github.com/repos/diaspora/diaspora/milestones{/number}","notifications_url":"https://api.github.com/repos/diaspora/diaspora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diaspora/diaspora/labels{/name}","releases_url":"https://api.github.com/repos/diaspora/diaspora/releases{/id}","deployments_url":"https://api.github.com/repos/diaspora/diaspora/deployments","created_at":"2010-09-15T05:20:04Z","updated_at":"2018-05-06T15:24:14Z","pushed_at":"2018-05-06T16:37:55Z","git_url":"git://github.com/diaspora/diaspora.git","ssh_url":"git@github.com:diaspora/diaspora.git","clone_url":"https://github.com/diaspora/diaspora.git","svn_url":"https://github.com/diaspora/diaspora","homepage":"https://diasporafoundation.org/","size":104628,"stargazers_count":11837,"watchers_count":11837,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2907,"mirror_url":null,"archived":false,"open_issues_count":416,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2907,"open_issues":416,"watchers":11837,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7751"},"html":{"href":"https://github.com/diaspora/diaspora/pull/7751"},"issue":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/7751"},"comments":{"href":"https://api.github.com/repos/diaspora/diaspora/issues/7751/comments"},"review_comments":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7751/comments"},"review_comment":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diaspora/diaspora/pulls/7751/commits"},"statuses":{"href":"https://api.github.com/repos/diaspora/diaspora/statuses/a377f11187b84e68719d968af1ab0874d13d0f9e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lislis"}}