{"action":"created","issue":{"url":"https://api.github.com/repos/waterlock/waterlock/issues/106","labels_url":"https://api.github.com/repos/waterlock/waterlock/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/waterlock/waterlock/issues/106/comments","events_url":"https://api.github.com/repos/waterlock/waterlock/issues/106/events","html_url":"https://github.com/waterlock/waterlock/issues/106","id":109781731,"number":106,"title":"Registration bug","user":{"login":"s-devaney","id":4226191,"avatar_url":"https://avatars.githubusercontent.com/u/4226191?v=3","gravatar_id":"","url":"https://api.github.com/users/s-devaney","html_url":"https://github.com/s-devaney","followers_url":"https://api.github.com/users/s-devaney/followers","following_url":"https://api.github.com/users/s-devaney/following{/other_user}","gists_url":"https://api.github.com/users/s-devaney/gists{/gist_id}","starred_url":"https://api.github.com/users/s-devaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-devaney/subscriptions","organizations_url":"https://api.github.com/users/s-devaney/orgs","repos_url":"https://api.github.com/users/s-devaney/repos","events_url":"https://api.github.com/users/s-devaney/events{/privacy}","received_events_url":"https://api.github.com/users/s-devaney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-05T12:02:32Z","updated_at":"2015-10-05T13:11:47Z","closed_at":null,"body":"Attempting to register a user using /auth/register when a) the email is already in use and b) a session already exists results in waterlock trying to send two responses.\r\n\r\nSteps to reproduce:\r\na) post valid email+password to /auth/register to trigger successful registration\r\nb) post the same credentials to /auth/register again\r\n\r\nwhat is expected:\r\na res.forbidden error - \"email is already in use\"\r\n\r\nwhat happens:\r\na res.forbidden error - \"email is already in use\" gets sent but waterlock also attempts to send a registration success response afterwards resulting in a sails error"},"comment":{"url":"https://api.github.com/repos/waterlock/waterlock/issues/comments/145523169","html_url":"https://github.com/waterlock/waterlock/issues/106#issuecomment-145523169","issue_url":"https://api.github.com/repos/waterlock/waterlock/issues/106","id":145523169,"user":{"login":"wayne-o","id":178060,"avatar_url":"https://avatars.githubusercontent.com/u/178060?v=3","gravatar_id":"","url":"https://api.github.com/users/wayne-o","html_url":"https://github.com/wayne-o","followers_url":"https://api.github.com/users/wayne-o/followers","following_url":"https://api.github.com/users/wayne-o/following{/other_user}","gists_url":"https://api.github.com/users/wayne-o/gists{/gist_id}","starred_url":"https://api.github.com/users/wayne-o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayne-o/subscriptions","organizations_url":"https://api.github.com/users/wayne-o/orgs","repos_url":"https://api.github.com/users/wayne-o/repos","events_url":"https://api.github.com/users/wayne-o/events{/privacy}","received_events_url":"https://api.github.com/users/wayne-o/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T13:11:47Z","updated_at":"2015-10-05T13:11:47Z","body":"Hi Sam\n\nThanks for that - if you could provide a failing test it would help if not\ndon't worry I will try and get on this in the next couple days\n\nCheers\n\nw\n\nOn Mon, 5 Oct 2015 at 13:02 Sam Devaney <notifications@github.com> wrote:\n\n> Attempting to register a user using /auth/register when a) the email is\n> already in use and b) a session already exists results in waterlock trying\n> to send two responses.\n>\n> Steps to reproduce:\n> a) post valid email+password to /auth/register to trigger successful\n> registration\n> b) post the same credentials to /auth/register again\n>\n> what is expected:\n> a res.forbidden error - \"email is already in use\"\n>\n> what happens:\n> a res.forbidden error - \"email is already in use\" gets sent but waterlock\n> also attempts to send a registration success response afterwards resulting\n> in a sails error\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/waterlock/waterlock/issues/106>.\n>\n"}}