3 ms·
> bcryptjs reaches for crypto.randomBytes and a few other Node primitives that aren't polyfilled in Workers. crypto.randomBytes is definitely in Workers' node
by kentonv 5mo ago
> bcryptjs reaches for crypto.randomBytes and a few other Node primitives that aren't polyfilled in Workers.
crypto.randomBytes is definitely in Workers' node compat layer. Is it possible you didn't enabled the node_compat flag?
https://developers.cloudflare.com/workers/runtime-apis/nodejs/ https://developers.cloudflare.com/workers/runtime-apis/nodej...
I guess maybe it's time we turned this on by default...
- qemuguest 5mo agoYou're right — corrected: https://finterm.xyz/blog/nextjs-on-cloudflare-workers https://finterm.xyz/blog/nextjs-on-cloudflare-workers. Argon2id was my choice eventually for OWASP reasons On-by-default nodejs_compat would be welcome - Thanks!