But with v4 strapi.plugins["users-permissions"].services.user no longer has the hashPassword function. Was this moved to somewhere else? I’m really in need to documentation on this topic
I have came up with a solution. For some reason the Strapi team has removed the hashPassword method of the user-permission.user service that looked like this
Some now we need to hash the password ourselves, for that I use the same package as the hashPassword function did (require with const bcrypt = require("bcryptjs");), like this:
Just ran across this issue as well and dug into it a bit. It looks like they removed that code because the entityService create/update now handles hashing if the field is a password field. See screenshot for details. If you breakpoint on updatePipeline it will return the data hashed. updatePipeline calls into applyTransforms and ultimately uses bcrypt.