The same is true of logging out - neither method appears to be attaching/detaching users to sessions. I have replicated this behavior with non-superusers. No errors are ever thrown, but no sessions are ever added or deleted. This is utterly bizarre to me - and I don't know what to do. Any suggestions for debugging would be immensely helpful - obviously authentication is a critical part of our application, and I can't move on until I fix this.
-- I have uploaded my settings.py in a repo below. Some notes on my configuration - I am using the email field as my username, and am using dj-rest-auth for authentication. There seems to be nothing wrong with dj-rest-auth: when I pass in a valid email/password combination, it successfully calls django's authenticate() method, which creates a valid user object, and then passes it to django.contrib.auth.login() along with the request. No exceptions are thrown inside the login() function - which I verified by stepping through it line-by-line with breakpoints. I am using the default runserver command as my django server.
Where is the actual code in the login() function that makes changes to the database? The only thing I can think of is that somehow the user_logged_in.send() signal is responsible, but this doesn't appear to be directly attached to any code I can find that could plausibly make database modifications.
https://github.com/edmundsj/django_auth_debug
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1a73c0d9-da20-4d7e-8d65-50c279ccd5f2n%40googlegroups.com.
No comments:
Post a Comment