How to replace bcrypt/bcryptjs with Crypto or napi-rs for password encryption for next-auth v5 ?
Unanswered
Losti! posted this in #help-forum
Losti!OP
Hi guys, I'm using next.js 15.2.4 with next-auth v5 and have been having a lot of issues with the bcrypt and bcryptjs packages, so I don't plan on adding them back to my project. I've seen that Crypto could be a good option for password encryption and decryption in my project, but I'm very unsure how to implement it without crashing the Edge runtime. I'd appreciate help with a Crypto implementation or a package that offers encryption and decryption like napi-rs (I'm having trouble implementing it, but I'll explain it here: https://github.com/napi-rs/node-rs/issues/964).
Thanks for your time.
As long as it can be solved without migrating from next-auth to another authentication tool, I'd really appreciate it! (Again, I don't plan on using bcrypt again.)
Thanks for your time.