{"action":"closed","issue":{"url":"https://api.github.com/repos/mozilla/testpilot/issues/553","repository_url":"https://api.github.com/repos/mozilla/testpilot","labels_url":"https://api.github.com/repos/mozilla/testpilot/issues/553/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/testpilot/issues/553/comments","events_url":"https://api.github.com/repos/mozilla/testpilot/issues/553/events","html_url":"https://github.com/mozilla/testpilot/issues/553","id":144373916,"number":553,"title":"Unstyled \"Sign up\" view appears if a User was manually created in Django admin instead of via signing up from FxA","user":{"login":"lmorchard","id":21687,"avatar_url":"https://avatars.githubusercontent.com/u/21687?v=3","gravatar_id":"","url":"https://api.github.com/users/lmorchard","html_url":"https://github.com/lmorchard","followers_url":"https://api.github.com/users/lmorchard/followers","following_url":"https://api.github.com/users/lmorchard/following{/other_user}","gists_url":"https://api.github.com/users/lmorchard/gists{/gist_id}","starred_url":"https://api.github.com/users/lmorchard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmorchard/subscriptions","organizations_url":"https://api.github.com/users/lmorchard/orgs","repos_url":"https://api.github.com/users/lmorchard/repos","events_url":"https://api.github.com/users/lmorchard/events{/privacy}","received_events_url":"https://api.github.com/users/lmorchard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/testpilot/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mozilla/testpilot/labels/status:%20ready","name":"status: ready","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-03-29T20:12:59Z","updated_at":"2016-10-02T15:51:44Z","closed_at":"2016-10-02T15:51:44Z","body":"This is probably an edge case no one will really see, but it's worth fixing at some point:\r\n\r\n* Create a new User from the Django admin with a real email address\r\n* Try signing in via FxA with that email address\r\n* You'll get an un-styled \"Sign up\" view with no good way to continue into the site\r\n\r\nNormally, the first sign-in from an unknown FxA ID results in 1) the auto-creation of a User record with the email address from FxA and 2) the auto-creation of a \"Social Account\" record linking the User record to the FxA ID. So, on next sign-in, the FxA ID will automatically login with the User record.\r\n\r\nBut, if that User was manually created - it didn't get a corresponding \"Social Account\" associating it with an FxA ID. So, the system thinks the FxA ID is trying to sign up for a new account, but with an email address that appears in an existing User record. And email addresses are unique per User record. \r\n\r\nBut, the \"Sign up\" view that appears in this case is ugly and fairly useless.\r\n\r\nSo... we should probably either 1) disable that sign up view & display an error message, or 2) quietly associate the FxA ID with the existing User that matches the email address FxA sends.\r\n"}}
{"actor":{"display_login":"chuckharmston"}}