2 points | by qemuguest 9 hours ago ago
2 comments
> 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/nodej...
I guess maybe it's time we turned this on by default...
You're right — corrected: 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!
> 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/nodej...
I guess maybe it's time we turned this on by default...
You're right — corrected: 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!