401 error.
Flow overview
1
Request a nonce
Fetch a one-time nonce from the server tied to your wallet address.
2
Construct and sign the SIWE message
Build an EIP-4361 message using the nonce, then sign it with your wallet.
3
Verify the signature
Submit the signed message to the server. On success, you receive a session cookie valid for subsequent requests.
Step 1: Request a nonce
-c cookies.txt flag saves the session cookie jar for use in subsequent requests.
Step 2: Construct and sign the SIWE message
Build an EIP-4361 message using the nonce. The message format is:signMessage method for this.
The exact string you sign must match what you submit in step 3. Use a SIWE library (e.g.,
viem/siwe) to construct and parse the message consistently.Step 3: Verify the signature
Submit the signed message and signature to authenticate. Include-b cookies.txt to send the cookie from step 1 and -c cookies.txt to save the updated session cookie.