Sign in with Ethereum
SIWE User Authentication using an Ethereum Address
Step 1: Fetch a Nonce from Moon
What is a nonce?
import { MoonSDK } from '@moonup/moon-sdk';
const sdk = new MoonSDK();
const nonce = await sdk.getSIWENonce(USER_ADDRESS_HERE);Step 2: User Signs a Message
How does this code prompt the user?
Step 3: Verify the SIWE Signature
Step 4: Handle Final Response from Moon’s Server
Full code for example:
Last updated