Hacker News new | ask | show | jobs
by kentonv 35 days 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/nodej...

I guess maybe it's time we turned this on by default...

1 comments

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!