Request Details

ctx.rng() is seeded from the call's timestamp (documented in crates/bindings/src/rng.rs), so it's predictable.
Modules that mint OAuth state/PKCE verifiers, invite codes, session tokens or webhook secrets have nowhere to get
unpredictable bytes, and today have to derive them from a secret passed in through env. A host-provided entropy call
(e.g. ctx.random_bytes(n) or a ctx.csprng(), outside the deterministic replay path) would close that gap.

  1. website-features added the feature-request label Oct 9, 2026

Reopen this request?

The request will return to its prior live status.

Mark as Duplicate

Pick the request that Feature: a cryptographically secure RNG for modules is a duplicate of. Energy rolls up into that request and GitHub closes the linked issue as a duplicate with a timeline reference to the canonical.

Unmark Duplicate

Restore as an independent request. The linked GitHub issue will be reopened and its duplicate-of relationship cleared. The original timeline entries stay as history; the note below is posted as a follow-up comment.