{"action":"created","issue":{"url":"https://api.github.com/repos/getsentry/sentry/issues/1463","labels_url":"https://api.github.com/repos/getsentry/sentry/issues/1463/labels{/name}","comments_url":"https://api.github.com/repos/getsentry/sentry/issues/1463/comments","events_url":"https://api.github.com/repos/getsentry/sentry/issues/1463/events","html_url":"https://github.com/getsentry/sentry/issues/1463","id":62627768,"number":1463,"title":"redirect loop when login without organization","user":{"login":"favadi","id":782760,"avatar_url":"https://avatars.githubusercontent.com/u/782760?v=3","gravatar_id":"","url":"https://api.github.com/users/favadi","html_url":"https://github.com/favadi","followers_url":"https://api.github.com/users/favadi/followers","following_url":"https://api.github.com/users/favadi/following{/other_user}","gists_url":"https://api.github.com/users/favadi/gists{/gist_id}","starred_url":"https://api.github.com/users/favadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/favadi/subscriptions","organizations_url":"https://api.github.com/users/favadi/orgs","repos_url":"https://api.github.com/users/favadi/repos","events_url":"https://api.github.com/users/favadi/events{/privacy}","received_events_url":"https://api.github.com/users/favadi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-18T08:53:32Z","updated_at":"2015-04-20T15:26:26Z","closed_at":null,"body":"In a fresh sentry 7.4.1 instance, after create an user with:\r\n\r\n```\r\nsentry --config=/etc/sentry.conf.py createuser\r\n```\r\n\r\nand login, sentry redirect to `https://sentry.local/organizations/new/` and cause a: `This webpage has a redirect loop` error in browser.\r\n\r\nIf I manually create a record in table `sentry_organizationmember` to set organization for this user, I can log in successfully. \r\n\r\nuwsgi log when redirect loop happens:\r\n\r\n```\r\nMar 18 08:28:52 integration-general-local nginx: https://alerts.local:443/organizations/new/- 192.168.11.4:- \"GET /organizations/new/ HTTP/1.1\" 0.011 760:302 302 \"https://alerts.local/auth/login/\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36\" \"-\"\r\nMar 18 08:28:52 integration-general-local uwsgi-sentry: [pid: 18628|app: 0|req: 12/12] 192.168.11.4 () {44 vars in 1070 bytes} [Wed Mar 18 08:28:52 2015] GET /organizations/new/ => generated 0 bytes in 10 msecs (HTTP/1.1 302) 4 headers in 148 bytes (1 switches on core 0)\r\nMar 18 08:28:52 integration-general-local nginx: https://alerts.local:443/- 192.168.11.4:- \"GET / HTTP/1.1\" 0.022 742:320 302 \"https://alerts.local/auth/login/\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36\" \"-\"\r\nMar 18 08:28:52 integration-general-local uwsgi-sentry: [pid: 18628|app: 0|req: 13/13] 192.168.11.4 () {44 vars in 1034 bytes} [Wed Mar 18 08:28:52 2015] GET / => generated 0 bytes in 21 msecs (HTTP/1.1 302) 4 headers in 166 bytes (1 switches on core 0)\r\nMar 18 08:28:52 integration-general-local nginx: https://alerts.local:443/organizations/new/- 192.168.11.4:- \"GET /organizations/new/ HTTP/1.1\" 0.012 760:302 302 \"https://alerts.local/auth/login/\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36\" \"-\"\r\n```"},"comment":{"url":"https://api.github.com/repos/getsentry/sentry/issues/comments/94483371","html_url":"https://github.com/getsentry/sentry/issues/1463#issuecomment-94483371","issue_url":"https://api.github.com/repos/getsentry/sentry/issues/1463","id":94483371,"user":{"login":"mvaled","id":270825,"avatar_url":"https://avatars.githubusercontent.com/u/270825?v=3","gravatar_id":"","url":"https://api.github.com/users/mvaled","html_url":"https://github.com/mvaled","followers_url":"https://api.github.com/users/mvaled/followers","following_url":"https://api.github.com/users/mvaled/following{/other_user}","gists_url":"https://api.github.com/users/mvaled/gists{/gist_id}","starred_url":"https://api.github.com/users/mvaled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvaled/subscriptions","organizations_url":"https://api.github.com/users/mvaled/orgs","repos_url":"https://api.github.com/users/mvaled/repos","events_url":"https://api.github.com/users/mvaled/events{/privacy}","received_events_url":"https://api.github.com/users/mvaled/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T15:26:26Z","updated_at":"2015-04-20T15:26:26Z","body":"I'm seeing this in 7.5.0.dev0 (self produced `.tar.gz` at commit 02c840121aae14e9f50fec94a501805fee54429a).  \r\n\r\nStrangely in my own development machine this does not happen."}}