{"action":"created","comment":{"url":"https://api.github.com/repos/18F/identity-idp/pulls/comments/185091777","pull_request_review_id":116414925,"id":185091777,"diff_hunk":"@@ -7,15 +7,14 @@ class TwoFactorAuthenticationSetupController < ApplicationController\n     before_action :authenticate_user\n \n     def index\n-      @user_phone_form = UserPhoneForm.new(current_user)\n+      @two_factor_options_form = TwoFactorOptionsForm.new(current_user)\n       analytics.track_event(Analytics::USER_REGISTRATION_PHONE_SETUP_VISIT)\n     end\n \n-    def set\n-      @user_phone_form = UserPhoneForm.new(current_user)\n-      result = @user_phone_form.submit(params[:user_phone_form])\n-\n-      analytics.track_event(Analytics::MULTI_FACTOR_AUTH_PHONE_SETUP, result.to_h)\n+    def create\n+      @two_factor_options_form = TwoFactorOptionsForm.new(current_user)\n+      result = @two_factor_options_form.submit(params[:two_factor_options_form])","path":"app/controllers/users/two_factor_authentication_setup_controller.rb","position":16,"original_position":16,"commit_id":"c5371f85d64e11b385760fd0b3527da1e94de36f","original_commit_id":"c5371f85d64e11b385760fd0b3527da1e94de36f","user":{"login":"jmhooper","id":963654,"avatar_url":"https://avatars1.githubusercontent.com/u/963654?v=4","gravatar_id":"","url":"https://api.github.com/users/jmhooper","html_url":"https://github.com/jmhooper","followers_url":"https://api.github.com/users/jmhooper/followers","following_url":"https://api.github.com/users/jmhooper/following{/other_user}","gists_url":"https://api.github.com/users/jmhooper/gists{/gist_id}","starred_url":"https://api.github.com/users/jmhooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmhooper/subscriptions","organizations_url":"https://api.github.com/users/jmhooper/orgs","repos_url":"https://api.github.com/users/jmhooper/repos","events_url":"https://api.github.com/users/jmhooper/events{/privacy}","received_events_url":"https://api.github.com/users/jmhooper/received_events","type":"User","site_admin":false},"body":"Same note here about permitting params.","created_at":"2018-04-30T19:56:09Z","updated_at":"2018-04-30T19:56:09Z","html_url":"https://github.com/18F/identity-idp/pull/2099#discussion_r185091777","pull_request_url":"https://api.github.com/repos/18F/identity-idp/pulls/2099","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/18F/identity-idp/pulls/comments/185091777"},"html":{"href":"https://github.com/18F/identity-idp/pull/2099#discussion_r185091777"},"pull_request":{"href":"https://api.github.com/repos/18F/identity-idp/pulls/2099"}}},"pull_request":{"url":"https://api.github.com/repos/18F/identity-idp/pulls/2099","id":181564636,"html_url":"https://github.com/18F/identity-idp/pull/2099","diff_url":"https://github.com/18F/identity-idp/pull/2099.diff","patch_url":"https://github.com/18F/identity-idp/pull/2099.patch","issue_url":"https://api.github.com/repos/18F/identity-idp/issues/2099","number":2099,"state":"open","locked":false,"title":"Offer multiple 2FA options during account creation","user":{"login":"line47","id":1449852,"avatar_url":"https://avatars2.githubusercontent.com/u/1449852?v=4","gravatar_id":"","url":"https://api.github.com/users/line47","html_url":"https://github.com/line47","followers_url":"https://api.github.com/users/line47/followers","following_url":"https://api.github.com/users/line47/following{/other_user}","gists_url":"https://api.github.com/users/line47/gists{/gist_id}","starred_url":"https://api.github.com/users/line47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/line47/subscriptions","organizations_url":"https://api.github.com/users/line47/orgs","repos_url":"https://api.github.com/users/line47/repos","events_url":"https://api.github.com/users/line47/events{/privacy}","received_events_url":"https://api.github.com/users/line47/received_events","type":"User","site_admin":false},"body":"_**This is a WIP**_\r\n\r\n**Why:** So that users can use phone(voice), text/SMS or an authenticator app to 2FA. \r\n\r\nHi! Before submitting your PR for review, and/or before merging it, please\r\ngo through the following checklist:\r\n\r\n- [ ] For DB changes, check for missing indexes, check to see if the changes\r\naffect other apps (such as the dashboard), make sure the DB columns in the\r\nvarious environments are properly populated, coordinate with devops, plan\r\nmigrations in separate steps.\r\n\r\n- [ ] For route changes, make sure GET requests don't change state or result in\r\ndestructive behavior. GET requests should only result in information being\r\nread, not written.\r\n\r\n- [ ] For encryption changes, make sure it is compatible with data that was\r\nencrypted with the old code.\r\n\r\n- [ ] For secrets changes, [make sure to update the S3 secrets bucket](https://github.com/18F/identity-private/wiki/Secrets-S3-buckets) with the \r\nnew configs in **all** environments. \r\n\r\n- [ ] Do not disable Rubocop or Reek offenses unless you are absolutely sure\r\nthey are false positives. If you're not sure how to fix the offense, please\r\nask a teammate.\r\n\r\n- [ ] When reading data, write tests for nil values, empty strings,\r\nand invalid formats.\r\n\r\n- [ ] When calling `redirect_to` in a controller, use `_url`, not `_path`.\r\n\r\n- [ ] When adding user data to the session, use the `user_session` helper\r\ninstead of the `session` helper so the data does not persist beyond the user's\r\nsession.\r\n\r\n- [ ] When adding a new controller that requires the user to be fully\r\nauthenticated, make sure to add `before_action :confirm_two_factor_authenticated`.\r\n","created_at":"2018-04-13T18:34:15Z","updated_at":"2018-04-30T19:56:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b10f44211b542a617151d829c632d3af0791ee9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"davemcorwin","id":6662371,"avatar_url":"https://avatars1.githubusercontent.com/u/6662371?v=4","gravatar_id":"","url":"https://api.github.com/users/davemcorwin","html_url":"https://github.com/davemcorwin","followers_url":"https://api.github.com/users/davemcorwin/followers","following_url":"https://api.github.com/users/davemcorwin/following{/other_user}","gists_url":"https://api.github.com/users/davemcorwin/gists{/gist_id}","starred_url":"https://api.github.com/users/davemcorwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davemcorwin/subscriptions","organizations_url":"https://api.github.com/users/davemcorwin/orgs","repos_url":"https://api.github.com/users/davemcorwin/repos","events_url":"https://api.github.com/users/davemcorwin/events{/privacy}","received_events_url":"https://api.github.com/users/davemcorwin/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/18F/identity-idp/pulls/2099/commits","review_comments_url":"https://api.github.com/repos/18F/identity-idp/pulls/2099/comments","review_comment_url":"https://api.github.com/repos/18F/identity-idp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/identity-idp/issues/2099/comments","statuses_url":"https://api.github.com/repos/18F/identity-idp/statuses/c5371f85d64e11b385760fd0b3527da1e94de36f","head":{"label":"18F:sw-2fa-options","ref":"sw-2fa-options","sha":"c5371f85d64e11b385760fd0b3527da1e94de36f","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":50386243,"name":"identity-idp","full_name":"18F/identity-idp","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/identity-idp","description":"18F Identity Provider (IdP)","fork":false,"url":"https://api.github.com/repos/18F/identity-idp","forks_url":"https://api.github.com/repos/18F/identity-idp/forks","keys_url":"https://api.github.com/repos/18F/identity-idp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/identity-idp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/identity-idp/teams","hooks_url":"https://api.github.com/repos/18F/identity-idp/hooks","issue_events_url":"https://api.github.com/repos/18F/identity-idp/issues/events{/number}","events_url":"https://api.github.com/repos/18F/identity-idp/events","assignees_url":"https://api.github.com/repos/18F/identity-idp/assignees{/user}","branches_url":"https://api.github.com/repos/18F/identity-idp/branches{/branch}","tags_url":"https://api.github.com/repos/18F/identity-idp/tags","blobs_url":"https://api.github.com/repos/18F/identity-idp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/identity-idp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/identity-idp/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/identity-idp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/identity-idp/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/identity-idp/languages","stargazers_url":"https://api.github.com/repos/18F/identity-idp/stargazers","contributors_url":"https://api.github.com/repos/18F/identity-idp/contributors","subscribers_url":"https://api.github.com/repos/18F/identity-idp/subscribers","subscription_url":"https://api.github.com/repos/18F/identity-idp/subscription","commits_url":"https://api.github.com/repos/18F/identity-idp/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/identity-idp/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/identity-idp/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/identity-idp/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/identity-idp/contents/{+path}","compare_url":"https://api.github.com/repos/18F/identity-idp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/identity-idp/merges","archive_url":"https://api.github.com/repos/18F/identity-idp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/identity-idp/downloads","issues_url":"https://api.github.com/repos/18F/identity-idp/issues{/number}","pulls_url":"https://api.github.com/repos/18F/identity-idp/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/identity-idp/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/identity-idp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/identity-idp/labels{/name}","releases_url":"https://api.github.com/repos/18F/identity-idp/releases{/id}","deployments_url":"https://api.github.com/repos/18F/identity-idp/deployments","created_at":"2016-01-25T22:40:59Z","updated_at":"2018-04-30T16:12:47Z","pushed_at":"2018-04-30T19:48:57Z","git_url":"git://github.com/18F/identity-idp.git","ssh_url":"git@github.com:18F/identity-idp.git","clone_url":"https://github.com/18F/identity-idp.git","svn_url":"https://github.com/18F/identity-idp","homepage":"https://secure.login.gov/","size":12894,"stargazers_count":161,"watchers_count":161,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":32,"open_issues":25,"watchers":161,"default_branch":"master"}},"base":{"label":"18F:master","ref":"master","sha":"d1359522252ab1c9f2a8aacedb2e93ddcc5363c4","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":50386243,"name":"identity-idp","full_name":"18F/identity-idp","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars0.githubusercontent.com/u/6233994?v=4","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/identity-idp","description":"18F Identity Provider (IdP)","fork":false,"url":"https://api.github.com/repos/18F/identity-idp","forks_url":"https://api.github.com/repos/18F/identity-idp/forks","keys_url":"https://api.github.com/repos/18F/identity-idp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/identity-idp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/identity-idp/teams","hooks_url":"https://api.github.com/repos/18F/identity-idp/hooks","issue_events_url":"https://api.github.com/repos/18F/identity-idp/issues/events{/number}","events_url":"https://api.github.com/repos/18F/identity-idp/events","assignees_url":"https://api.github.com/repos/18F/identity-idp/assignees{/user}","branches_url":"https://api.github.com/repos/18F/identity-idp/branches{/branch}","tags_url":"https://api.github.com/repos/18F/identity-idp/tags","blobs_url":"https://api.github.com/repos/18F/identity-idp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/identity-idp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/identity-idp/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/identity-idp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/identity-idp/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/identity-idp/languages","stargazers_url":"https://api.github.com/repos/18F/identity-idp/stargazers","contributors_url":"https://api.github.com/repos/18F/identity-idp/contributors","subscribers_url":"https://api.github.com/repos/18F/identity-idp/subscribers","subscription_url":"https://api.github.com/repos/18F/identity-idp/subscription","commits_url":"https://api.github.com/repos/18F/identity-idp/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/identity-idp/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/identity-idp/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/identity-idp/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/identity-idp/contents/{+path}","compare_url":"https://api.github.com/repos/18F/identity-idp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/identity-idp/merges","archive_url":"https://api.github.com/repos/18F/identity-idp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/identity-idp/downloads","issues_url":"https://api.github.com/repos/18F/identity-idp/issues{/number}","pulls_url":"https://api.github.com/repos/18F/identity-idp/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/identity-idp/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/identity-idp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/identity-idp/labels{/name}","releases_url":"https://api.github.com/repos/18F/identity-idp/releases{/id}","deployments_url":"https://api.github.com/repos/18F/identity-idp/deployments","created_at":"2016-01-25T22:40:59Z","updated_at":"2018-04-30T16:12:47Z","pushed_at":"2018-04-30T19:48:57Z","git_url":"git://github.com/18F/identity-idp.git","ssh_url":"git@github.com:18F/identity-idp.git","clone_url":"https://github.com/18F/identity-idp.git","svn_url":"https://github.com/18F/identity-idp","homepage":"https://secure.login.gov/","size":12894,"stargazers_count":161,"watchers_count":161,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":32,"open_issues":25,"watchers":161,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/identity-idp/pulls/2099"},"html":{"href":"https://github.com/18F/identity-idp/pull/2099"},"issue":{"href":"https://api.github.com/repos/18F/identity-idp/issues/2099"},"comments":{"href":"https://api.github.com/repos/18F/identity-idp/issues/2099/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/identity-idp/pulls/2099/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/identity-idp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/identity-idp/pulls/2099/commits"},"statuses":{"href":"https://api.github.com/repos/18F/identity-idp/statuses/c5371f85d64e11b385760fd0b3527da1e94de36f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jmhooper"}}