Skip to content

Commit 4bc3e6a

Browse files
committed
[v8] Use globalThis.crypto.randomUUID for runtime-agnostic UUIDs (#1398)
Replaces Node.js-specific crypto import with globalThis.crypto to ensure compatibility across Node.js 20 and other runtimes. Does this require changes to the WorkOS Docs? E.g. the [API Reference](https://workos.com/docs/reference) or code snippets need updates. ``` [ ] Yes ``` If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
1 parent 4bbc0e0 commit 4bc3e6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/audit-logs/audit-logs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class AuditLogs {
3535
...options,
3636
idempotencyKey:
3737
options.idempotencyKey ||
38-
`workos-node-${this.workos.getCryptoProvider().randomUUID()}`,
38+
`workos-node-${globalThis.crypto.randomUUID()}`,
3939
};
4040

4141
await this.workos.post(

0 commit comments

Comments
 (0)