{"action":"created","issue":{"url":"https://api.github.com/repos/Tivix/django-rest-auth/issues/78","repository_url":"https://api.github.com/repos/Tivix/django-rest-auth","labels_url":"https://api.github.com/repos/Tivix/django-rest-auth/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/Tivix/django-rest-auth/issues/78/comments","events_url":"https://api.github.com/repos/Tivix/django-rest-auth/issues/78/events","html_url":"https://github.com/Tivix/django-rest-auth/issues/78","id":70500765,"number":78,"title":"AttributeError: 'User' object has no attribute 'backend'","user":{"login":"philippeluickx","id":836866,"avatar_url":"https://avatars.githubusercontent.com/u/836866?v=3","gravatar_id":"","url":"https://api.github.com/users/philippeluickx","html_url":"https://github.com/philippeluickx","followers_url":"https://api.github.com/users/philippeluickx/followers","following_url":"https://api.github.com/users/philippeluickx/following{/other_user}","gists_url":"https://api.github.com/users/philippeluickx/gists{/gist_id}","starred_url":"https://api.github.com/users/philippeluickx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippeluickx/subscriptions","organizations_url":"https://api.github.com/users/philippeluickx/orgs","repos_url":"https://api.github.com/users/philippeluickx/repos","events_url":"https://api.github.com/users/philippeluickx/events{/privacy}","received_events_url":"https://api.github.com/users/philippeluickx/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":49,"created_at":"2015-04-23T20:06:04Z","updated_at":"2016-03-21T11:24:45Z","closed_at":null,"body":"Not sure where this suddenly comes from...\r\n\r\nAttributeError: 'User' object has no attribute 'backend'\r\n\r\nrest_auth/views.py\", line 54, in login\r\n    login(self.request, self.user)\r\n\r\nGot pointed to these docs:\r\nhttps://docs.djangoproject.com/en/1.8/topics/auth/default/#django.contrib.auth.login\r\n\r\nWhat baffles me is that everything was working nicely before and I have no clue what I changed to get this message..."},"comment":{"url":"https://api.github.com/repos/Tivix/django-rest-auth/issues/comments/199232445","html_url":"https://github.com/Tivix/django-rest-auth/issues/78#issuecomment-199232445","issue_url":"https://api.github.com/repos/Tivix/django-rest-auth/issues/78","id":199232445,"user":{"login":"commilfo","id":17847849,"avatar_url":"https://avatars.githubusercontent.com/u/17847849?v=3","gravatar_id":"","url":"https://api.github.com/users/commilfo","html_url":"https://github.com/commilfo","followers_url":"https://api.github.com/users/commilfo/followers","following_url":"https://api.github.com/users/commilfo/following{/other_user}","gists_url":"https://api.github.com/users/commilfo/gists{/gist_id}","starred_url":"https://api.github.com/users/commilfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commilfo/subscriptions","organizations_url":"https://api.github.com/users/commilfo/orgs","repos_url":"https://api.github.com/users/commilfo/repos","events_url":"https://api.github.com/users/commilfo/events{/privacy}","received_events_url":"https://api.github.com/users/commilfo/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T11:24:45Z","updated_at":"2016-03-21T11:24:45Z","body":"I get the same issue\r\n\r\n> Traceback (most recent call last):\r\n  File \"\\django\\core\\handlers\\base.py\", line 149, in get_response\r\n    response = self.process_exception_by_middleware(e, request)\r\n  File \"\\django\\core\\handlers\\base.py\", line 147, in get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"\\django\\views\\decorators\\csrf.py\", line 58, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"\\django\\views\\generic\\base.py\", line 68, in view\r\n    return self.dispatch(request, *args, **kwargs)\r\n  File \"\\rest_framework\\views.py\", line 466, in dispatch\r\n    response = self.handle_exception(exc)\r\n  File \"\\rest_framework\\views.py\", line 463, in dispatch\r\n    response = handler(request, *args, **kwargs)\r\n  File \"\\rest_auth\\views.py\", line 51, in post\r\n    self.login()\r\n  File \"\\rest_auth\\views.py\", line 41, in login\r\n    login(self.request, self.user)\r\n  File \"\\django\\contrib\\auth\\__init__.py\", line 112, in login\r\n    request.session[BACKEND_SESSION_KEY] = user.backend\r\nAttributeError: 'Account' object has no attribute 'backend'\r\n\r\nwhen I login through Facebook with an email which already exists for some other user.\r\nA new user is created with the same email but without username. And then it fails with the above error.\r\n\r\nIf I login through Facebook and there's no other user with the same email, everything is Ok and a new user is created (with username this time)."}}