What problem does it solve?
Sign-In with Ethereum (SIWE) authentication for Scaffold-ETH 2 projects replaces passwords with wallet-based login, enabling secure user sessions driven by cryptographic signatures.
Core Features & Use Cases
- Nonce-based SIWE flow: generate a nonce, create a SIWE message, have the user sign it, and verify on the server to establish a session.
- ERC-6492-compatible verification using Viem utilities to support smart wallets and on-chain validation.
- Encrypted cookie-based sessions with iron-session, including domain validation to prevent replay and cross-site issues.
- Typical SE-2 scenarios include user login, cross-wallet authentication, and persistent user sessions across frontend-backend stacks.
Quick Start
Integrate SIWE by following the steps to generate a nonce, construct a SIWE message, sign with the wallet, and verify to establish a session.