Secure Hashing of Passwords in Workers
Working on a project where I want to salt and hash passwords using cloudflare workers, I'm using next-on-pages with Nextjs 14 and this means that I can't access libraries like
bcrypt
or similar that require os
or fs
. I have a hacky solution but it's just that, a hacky workaround and while security isn't something I'm fussed about, I would at least like to use a validated salt and hash strategy. If anyone knows any libraries that would work or other solutions please let me know.
Here is my hacky solution, this was botched together in a single afternoon so I'm not expecting it to work well but it does the job for now:
2 Replies
I'm so stupid, I must have just completely blanked that module's existence while franticly searching for ages. Thank you very much @Leo ! I did so much unnecessary work lol.
bcrypt-js is not working for me (NextJS 14) using Edge. How did you fix it?