I plan to migrate a system developed with PHP Laravel that hashed users password with bcrypt, so just wanted to know is there anyway to convert them somehow in order to make new NodeJS system (with bcrypt) to reuse the current password fields? or the only way forward is to ask user to reset passwords?
2 Answers
Are you asking if the hashed password data (stored on the server, for example) can be used in another bcrypt implementation in node, or something else?
Using modules in node should work with the existing password data (as someone already suggested), but remember to use the same exact salting method and options as the previous bcrypt implementation in PHP, obviously, so that bcrypt generates the same data as before. As long as all options and input into bcrypt are the same, the bcrypt implementation in node should produce the same results and be able to be used.
3 Comments
Using the bcrypt or bcryptjs modules in node with the existing passwords should work just fine.