HomarrH
Homarr2y ago
Gojo

Issue with python password encryption

so i am trying to create a user using python directly entering a user enter into db but on that my auth fails
salt = bcrypt.gensalt(10)
hashed_password = bcrypt.hashpw(password.encode('utf-8'), salt)
user_id = uuid.uuid4()
cursor.execute('''INSERT INTO users (id, name, email, password, salt, isAdmin, isOwner)VALUES (?, ?, ?, ?, ?, ?, ?)''',(user_id, username, None, hashed_password, salt, True, True))

This how my code looks like is not possible to hash password via python i think hashing is correct but docker logs show no error what reason of fail auth hope you can point me to right direction. 🙂
Was this page helpful?