1

I'm having a problem where Django's login is working okay on Chrome but not on Firefox: when trying to login to a restricted portion of the site on Firefox, it simply loops back again and again to the login page; furthermore, no error message appears on the log regarding that. Interestingly, the error doesn't happen when the server is on the local machine.

Does someone have a general idea of what could be causing that strange behavior?

I'm using Django 1.6 on Python 2.7

Haroldo_OK
  • 6,612
  • 3
  • 43
  • 80

1 Answers1

4

this isn't much of an answer, but a linking to other similar problems. Because I don't have rep, all I can do is leave an answer.

A issue like this was encountered in 2012 but was never conclusively answered:
Django session doesn't work in Firefox

A similar question where the user could login via local server but not remote firefox was encoutered:
Unable log in to the django admin page with a valid username and password

The second was very well documented and had an accepted answer that was well liked.

Recommendations:

  1. If you are not using https make sure you have this setting SESSION_COOKIE_SECURE = False.
  2. If you are using a database backed, Check if the session is actually being created in the django_sessions table .
  3. If you are using a cached backed, check that SESSION_ENGINE is django.contrib.sessions.backends.cache and that CACHE_BACKEND is properly configured.
Community
  • 1
  • 1
Gadget
  • 434
  • 4
  • 9
  • In my case, emptying the session table and cleaning up the domain cookies seemed to solve the problem, though I still haven't found the exact cause of the problem. – Haroldo_OK Jun 25 '14 at 17:37