[PR #6741] [MERGED] docs: restrict SIWE example nonce generation characters #32459

Closed
opened 2026-04-17 23:15:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6741
Author: @coopbri
Created: 12/13/2025
Status: Merged
Merged: 12/14/2025
Merged by: @Bekacru

Base: canaryHead: docs/siwe-nonce-generation


📝 Commits (1)

  • ac24134 docs(siwe): fix nonce generation example

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 docs/content/docs/plugins/siwe.mdx (+1 -1)

📄 Description

EIP-4361 indicates that generated nonces should be "at least 8 alphanumeric characters". The current BA docs use the BA generateRandomString utility to generate nonces, however this currently implements a mix of alphanumeric and non-alphanumeric characters. I updated the docs example to only pull alphanumeric characters for nonce generation.


Summary by cubic

Update SIWE docs to generate alphanumeric-only nonces, matching EIP-4361. Example now uses generateRandomString(32, "a-z", "A-Z", "0-9") instead of generateRandomString(32).

Written for commit ac24134dbd. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6741 **Author:** [@coopbri](https://github.com/coopbri) **Created:** 12/13/2025 **Status:** ✅ Merged **Merged:** 12/14/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `docs/siwe-nonce-generation` --- ### 📝 Commits (1) - [`ac24134`](https://github.com/better-auth/better-auth/commit/ac24134dbd50c596c6c3dec2ea5ccd89fa0f8178) docs(siwe): fix nonce generation example ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/siwe.mdx` (+1 -1) </details> ### 📄 Description [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) indicates that generated nonces should be "at least 8 alphanumeric characters". The current BA docs use the BA `generateRandomString` utility to generate nonces, however this currently implements a mix of alphanumeric and non-alphanumeric characters. I updated the docs example to only pull alphanumeric characters for nonce generation. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Update SIWE docs to generate alphanumeric-only nonces, matching EIP-4361. Example now uses generateRandomString(32, "a-z", "A-Z", "0-9") instead of generateRandomString(32). <sup>Written for commit ac24134dbd50c596c6c3dec2ea5ccd89fa0f8178. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 23:15:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#32459