Monday, October 7, 2019

Re: Why would check_password(..) return True but authenticate(.., ..) never return user?

Hi Christian,

authentication() functions takes request parameter if the request is None it will simply

break
the for loop. Check the source code of authenticate.


--
Thanks
Pradeep Sukhwani

On Monday, October 7, 2019 at 5:52:00 AM UTC+5:30, Christian Seberino wrote:
Why would check_password(..) return True but authenticate(.., ..) never return user?

See this session in a Django shell below...

>>> u  <User: xx>    >>> u.username  'xx'    >>> u.password  'pbkdf2_sha256$100000$f3zIUwPXtnEM$zbQdcgPNgRi6CBPQu8wlRg4T7egH80S9bnL0FPunZRo='    >>> u.check_password("yy")  True    >>> django.contrib.auth.authenticate(username="xx", password="yy")  >>>

--
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/aa35b3d9-465f-4cd0-adc3-afef9a1ebb90%40googlegroups.com.

No comments:

Post a Comment