mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
1.0 KiB
JSON
1 line
1.0 KiB
JSON
[{"user_id": 36639, "stars": [], "topic_id": 43113, "date_created": 1312227278.1343169, "message": "If I log in a user A@gmail.com, and then without logging out first, I log in as user B@gmail.com, an exception is thrown in SocialAuthBackend::authenticate for ''Account already in use.\"\n\nWhat the code should do is log out user A, and log in user B. In my fix for this problem, I decided to log out user A before redirecting to Google. That is, in social_auth.auth_process, after retrieving a valid backend and before setting *any* session variables, I include the following code:\n\n # if another is currently logged in, then log them out\n user = request.user if request.user.is_authenticated() else None\n if user:\n logout(request) # deletes all session cookies", "group_id": 5196, "id": 1768884}, {"user_id": 20656, "stars": [], "topic_id": 43113, "date_created": 1313005065.5216169, "message": "This should be done in the view, it's not something on concern of the backends IMO, I'll submit a fix for it. Thanks", "group_id": 5196, "id": 1842193}] |