Using BcryptJS with Better-Auth
Hi everyone,
I’m looking for an example of how to use BcryptJS with Better-Auth. I have existing users with bcrypt-hashed passwords, so I need to configure the password option properly for both hashing and verifying passwords.
The documentation mentions:
"You can customize the password hashing function by setting the password option in the configuration. This option should include a hash function to hash passwords and a verify function to verify them."
However, I haven’t found any examples or further details, and this option isn’t listed in the options reference.
If anyone can provide an example or point me in the right direction, I’d really appreciate it!
Thanks!
I’m looking for an example of how to use BcryptJS with Better-Auth. I have existing users with bcrypt-hashed passwords, so I need to configure the password option properly for both hashing and verifying passwords.
The documentation mentions:
"You can customize the password hashing function by setting the password option in the configuration. This option should include a hash function to hash passwords and a verify function to verify them."
However, I haven’t found any examples or further details, and this option isn’t listed in the options reference.
If anyone can provide an example or point me in the right direction, I’d really appreciate it!
Thanks!