I use securedsocial to manage the singup and login of my project. The password created by securedsocial stored in the mongodb is as below:
"password" : {
"hasher" : "bcrypt",
"password" : "$2a$10$ttFOX3YrXwQyiUVVRWL1Ku54CediP/Z/pGQ8QOP2YBKL/s87wyGba",
"salt" : null
}
I now want to create a new user manually so i need to know how to encrypt the password the same way as securedsocial. Or if there is any tool to do this?
You can use the PasswordHasher the module uses to hash the passwords and then save them. By default SecureSocial uses BCrypt.