Why wallet signatures instead of passwords?
- No new passwords – authentication happens with the key the user already controls.
- Nothing to steal or reuse – each login is a one-off, domain-bound signature that never leaves the user’s device.
- Wallet-agnostic – works in any EIP-1193 wallet (browser extension, mobile deep-link, embedded provider) and follows the open “Sign in with Ethereum” (SIWE) EIP-4361 standard.
Please Follow the Brand GuidelinesIf you intend on using the
SignInWithBaseButton
, please follow the Brand Guidelines to ensure consistency across your application.High-level flow
Undeployed Smart Wallets?
Base Account signatures include the ERC-6492 wrapper so they can be verified even before the wallet contract is deployed. Viem’s
Base Account signatures include the ERC-6492 wrapper so they can be verified even before the wallet contract is deployed. Viem’s
verifyMessage
and verifyTypedData
handle this automatically.Implementation
Code Snippets
If using the above code beyond Base Account, note that not every wallet supports the new
wallet_connect
method yet. If the call throws [method_not_supported
], fall back to using eth_requestAccounts
and personal_sign
.To avoid popup blockers, fetch or generate the nonce before the user presses “Sign in with Base” (for example on page load). For security, the only requirement is that your backend keeps track of every nonce and refuses any that are reused – regardless of where it originated.
Example Express Server
server/auth.ts
Add the Base Sign In With Base Button
Use the pre-built component for a native look-and-feel:App.tsx
Please Follow the Brand GuidelinesIf you intend on using the
SignInWithBaseButton
, please follow the Brand Guidelines to ensure consistency across your application.