From 0b8c469697d25f47904efa81fa09ac475239cc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B3=D8=AC=D8=A7=D8=AF=20=D9=85=D9=88=D8=AD=D8=AF=D9=8A?= <1190257165@esco.local> Date: Mon, 4 May 2026 14:26:40 +0330 Subject: [PATCH 1/2] fix(docs): remove trailing comma from JSON response example in agent-builder-codes Fixes #1313 - The JSON response example had a trailing comma which is invalid JSON syntax. --- docs/ai-agents/setup/agent-builder-codes.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ai-agents/setup/agent-builder-codes.mdx b/docs/ai-agents/setup/agent-builder-codes.mdx index 89ff1f0fa..336657d18 100644 --- a/docs/ai-agents/setup/agent-builder-codes.mdx +++ b/docs/ai-agents/setup/agent-builder-codes.mdx @@ -34,7 +34,7 @@ Response: ```json Response { "builderCode": "bc_a1b2c3d4", - "walletAddress": "0x...", + "walletAddress": "0x..." } ``` From 45b47e30c7085dcb78220732f1df59580502de13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B3=D8=AC=D8=A7=D8=AF=20=D9=85=D9=88=D8=AD=D8=AF=D9=8A?= <1190257165@esco.local> Date: Tue, 5 May 2026 13:13:15 +0330 Subject: [PATCH 2/2] fix(docs): replace Math.random() nonce with crypto.randomUUID() Math.random() is not cryptographically secure and should not be used for SIWE nonces. Replaces with window.crypto.randomUUID() to match the approach already used in the authenticate-users guide. Fixes #1390 --- docs/base-account/framework-integrations/wagmi/setup.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/base-account/framework-integrations/wagmi/setup.mdx b/docs/base-account/framework-integrations/wagmi/setup.mdx index cd96ec631..4836fe4b6 100644 --- a/docs/base-account/framework-integrations/wagmi/setup.mdx +++ b/docs/base-account/framework-integrations/wagmi/setup.mdx @@ -335,9 +335,7 @@ export function SignInWithBase({ connector }: SignInWithBaseProps) { if (provider) { try { // Generate a fresh nonce (this will be overwritten with the backend nonce) - const clientNonce = - Math.random().toString(36).substring(2, 15) + - Math.random().toString(36).substring(2, 15); + const clientNonce = window.crypto.randomUUID().replace(/-/g, ''); console.log("clientNonce", clientNonce); // Connect with SIWE to get signature, message, and address const accounts = await (provider as any).request({