Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Django fails user authentication

Check user password fails after save

Django 1.11 postgres (postgis)

password hashes defined in settings.py

PASSWORD_HASHERS = [
    'django.contrib.auth.hashers.PBKDF2PasswordHasher',
    'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
    'django.contrib.auth.hashers.Argon2PasswordHasher',
    'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
    'django.contrib.auth.hashers.BCryptPasswordHasher', ]

What I trying to do:

> ./manage shell
    In [1]: from accounts.models import User

In [2]: u = User.objects.get(pk=1)

In [3]: u.password
Out[3]: 'pbkdf2_sha256$36000$LlYFKXzibqZP$t7njfFLddkUos0ePjMTlSqM2KVhduFVvXTEobiHbXng=                                                   '

In [4]: u.check_password('123456')
Out[4]: False

In [5]: u.refresh_from_db()

In [6]: u.set_password('123456')

In [7]: u.password
Out[7]: 'pbkdf2_sha256$36000$WwQpAA6KyVX8$2GMy23BV1go4h/f/nlBezA50Jsc7QOi2sBlZsYhPAYM='

In [8]: u.check_password('123456')
Out[8]: True

In [9]: u.refresh_from_db()

In [10]: u.password
Out[10]: 'pbkdf2_sha256$36000$LlYFKXzibqZP$t7njfFLddkUos0ePjMTlSqM2KVhduFVvXTEobiHbXng=                                                   '

In [11]: u.check_password('123456')
Out[11]: False

Update: First I thought it because migrate database from mysql to postgres but even for reseting password

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!