It’s my understanding that passwords are typically encoded in base64. So we have our reset/generate button setup to randomly generate a password encode it and write it to the table.
We have tested to make sure that what is in the table for the password comes back correct so its not an issue where we are writing the wrong password to the table and attempting to login with the wrong password.
Is there a step or anything that I’m missing? Does something else on the backend check something I’m missing? The only thing different between the two methods of changing the password that I can see is where its happening. The passwords being recorded appear to be exactly the same in the table.
Just good rule of thumb if you’re using Ignition’s built in solution then to interact with it’s definitely preferable to use their API for it. Simple as
user = system.user.getUser("someUserSource", "someUserName")
user.set("Password", "newPassword")
result = system.user.editUser("someUserSource", user)
if result.errors:
# handle here
Your code is sending encodedPassword to the stored procedure instead of encryptPass. SHA1 hashes don't look like what your passwd column shows. Your column looks like base64 encoded data, not hashed data.
Edit: Although, maybe it's doing a base64 encode on it as well. I just tested your code and I get the following string for my encryptPass variable: eO9d3kIvGVY/WZS0FPu4w4j0hjA=