migrate_password_hash_algorithm.rdoc

doc/guides/migrate_password_hash_algorithm.rdoc
Last Update: 2021-02-04 12:50:18 -0800

Migrate users passwords from bcrypt to argon2 or back

If you are currently using the default bcrypt password hash algorithm, and want to gradually migrate to the argon2 password hash algorithm, you can use both the argon2 and update_password_hash features:

plugin :rodauth do
  enable :login, :update_password_hash, :argon2
end

When a user with a current bcrypt password hash next successfully uses their password, their password hash will be migrated to argon2.

If for some reason you want to migrate back from argon2 to bcrypt, you can set use_argon2? false in your Rodauth configuration.