Hash the password

I would like to hash a password, using the form that better-auth uses, so that when updating account in the password field, the user can access with this new password. I have a SuperAdmin process, and if this is necessary, is it possible to do this?
1 Reply
bekacru
bekacru3mo ago
you can use the context
const ctx = await auth.$context
ctx.password.hash(pass)
const ctx = await auth.$context
ctx.password.hash(pass)

Did you find this page helpful?