[PR #4685] [MERGED] docs: update siwe.mdx #31129

Closed
opened 2026-04-17 22:03:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4685
Author: @diogoribeirodev
Created: 9/15/2025
Status: Merged
Merged: 9/16/2025
Merged by: @himself65

Base: mainHead: patch-2


📝 Commits (2)

📊 Changes

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

View changed files

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

📄 Description

docs(siwe): clarify chainId parameter requirements and add chain examples

  • Fix misleading "optional" description for chainId parameter
  • Use conditional format: "optional for Ethereum mainnet, required for other chains"
  • Add chain-specific examples (Polygon, Arbitrum, Base) showing required chainId values
  • Add warning callout explaining chainId must match SIWE message Chain ID
  • Prevent 401 verification errors from chainId mismatches that confused developers

The chainId parameter was documented as "optional" but actually required for all non-mainnet chains, causing verification failures. Now clearly explains when it's optional vs required.


Summary by cubic

Clarifies SIWE chainId docs: optional on Ethereum mainnet (defaults to 1), required on other chains, and must match the Chain ID in the SIWE message. Adds examples for Polygon (137), Arbitrum (42161), and Base (8453), plus a warning to prevent 401 verification errors from mismatches.


🔄 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/4685 **Author:** [@diogoribeirodev](https://github.com/diogoribeirodev) **Created:** 9/15/2025 **Status:** ✅ Merged **Merged:** 9/16/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `main` ← **Head:** `patch-2` --- ### 📝 Commits (2) - [`8a4ec1e`](https://github.com/better-auth/better-auth/commit/8a4ec1e6f2d74f407cb62aea554494579c99224c) Update siwe.mdx - [`ba23ed1`](https://github.com/better-auth/better-auth/commit/ba23ed159109d642cb87c5775a6969caeab59ec7) docs: update ### 📊 Changes **1 file changed** (+50 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/siwe.mdx` (+50 -2) </details> ### 📄 Description docs(siwe): clarify chainId parameter requirements and add chain examples - Fix misleading "optional" description for chainId parameter - Use conditional format: "optional for Ethereum mainnet, required for other chains" - Add chain-specific examples (Polygon, Arbitrum, Base) showing required chainId values - Add warning callout explaining chainId must match SIWE message Chain ID - Prevent 401 verification errors from chainId mismatches that confused developers The chainId parameter was documented as "optional" but actually required for all non-mainnet chains, causing verification failures. Now clearly explains when it's optional vs required. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Clarifies SIWE chainId docs: optional on Ethereum mainnet (defaults to 1), required on other chains, and must match the Chain ID in the SIWE message. Adds examples for Polygon (137), Arbitrum (42161), and Base (8453), plus a warning to prevent 401 verification errors from mismatches. <!-- 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 22:03:26 -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#31129