Open Ashwintrn opened 1 year ago
I also was confused / amused by the encrypted_password
name. Note that in the code it mentions that it is named like this for legacy reasons:
How would one implement a rename of the field in a backwards compatible manner? I imagine something like this:
password_hash
alias to database_authenticatable
: This allows to use password_hash
in most places in the code, without needing to change anything else.encrypted_password
field in the DB to password_hash
, the generated migrations, providing an update path when upgrading the gem and add a deprecated alias encrypted_password
to the new password_hash
Or maybe allow to use either password_hash
or encrypted_password
as the DB field name as an intermediate step?
Currently, the column designated for the hashed value of the password is named "encrypted_password". While I understand the historical context, I've noticed that this term could potentially be a bit misleading for some users. For clarity and user experience, It would be helpful to rename this column to something like "password_hash" or another relatable name. If suitable/possible we can just give an alias_name in the codebase. This adjustment could help avoid confusion and create a more intuitive environment for users interacting with the database directly. Much Appreciate your work. TIA.