What problem does it solve?
Adding wallet-based login to a Blazor application requires implementing the SIWE (EIP-4361) message flow, signature verification, session or JWT management, and Blazor authorization integration, which is complex to wire up correctly from scratch.
Core Features & Use Cases
- SIWE Authentication Flow: Generate SIWE messages with nonces, prompt wallet signatures, verify signatures, and issue JWTs or server sessions for both Blazor Server and Blazor WASM hosting models.
- Blazor Authorization Integration: Use EthereumConnected and SiweAuthenticated roles with AuthorizeView and custom AuthenticationStateProvider implementations to gate UI and components.
- Advanced Wallet Support: Verify smart contract wallet signatures via ERC-1271 and ERC-6492, and gate access by NFT ownership using ERC721BalanceEthereumUserService.
- Use Case: A developer building a Blazor WASM dApp can stand up a REST API that issues SIWE messages, validates signed messages against stored nonces, and returns JWTs so users log in with MetaMask instead of passwords.
Quick Start
Implement Sign-In with Ethereum authentication in my Blazor app using Nethereum.Siwe with JWT tokens and an AuthorizeView-protected page.