Overview
Sign-In with Ethereum (SIWE) is a standard for passwordless authentication using Ethereum accounts. It allows users to authenticate to your application by signing a message with their Ethereum address, providing a self-custodied alternative to centralized identity providers. Learn more about the SIWE standard (EIP-4361).Compatibility
SIWE SDK methods are available via thesiwe module of the Web and React Native client-side SDKs.
Available Methods: Users authenticated through the SIWE extension can use the following
user methods:user.isLoggedIn()user.getInfo()user.logout()
Usage
Installation
Sign in with a Third-Party Wallet
To authenticate users with a third-party wallet (e.g., MetaMask, Coinbase Wallet), follow these steps:- Generate a SIWE message using the wallet’s address
- Sign the message with the third-party wallet
- Complete authentication with Magic using the message and signature
JavaScript
Sign in with Worldcoin Mini App
To authenticate users with Worldcoin Mini Apps, you can use World App’s native wallet integration. Follow these steps:- Generate a nonce from Magic
- Request wallet authentication from World App
- Extract the signed message and signature
- Complete authentication with Magic
This example requires the
@worldcoin/minikit-js package. See the Worldcoin Mini Apps documentation for setup instructions.JavaScript