Skip to main content

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 the siwe 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()
SIWE authentication is designed for authentication purposes, so wallet operations are handled through the user’s third-party wallet provider.

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:
  1. Generate a SIWE message using the wallet’s address
  2. Sign the message with the third-party wallet
  3. 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:
  1. Generate a nonce from Magic
  2. Request wallet authentication from World App
  3. Extract the signed message and signature
  4. Complete authentication with Magic
This example requires the @worldcoin/minikit-js package. See the Worldcoin Mini Apps documentation for setup instructions.
JavaScript