EIPs Explained

ERC-8019 · Review · ERC · 2025-09-02

ERC-8019: Minimal Wallet-Managed Auto-Login for SIWE

Lets a wallet keep a local allowlist of trusted sites and silently sign their Sign-In with Ethereum messages when simple match rules pass, so returning users skip the login prompt.

What problem does it solve?

ERC-4361 (Sign-In with Ethereum, SIWE) lets a site authenticate a user by having the wallet sign a structured text message. It works, but users end up approving the same login message for the same trusted app again and again, which is tedious and trains people to click "sign" without reading.

ERC-8019 lets the wallet, not the app, decide that a particular site is trusted and sign its SIWE messages automatically, using a small set of deterministic match rules. Apps need no changes for this to work.

How it works

The wallet stores one policy per trusted app:

Field Meaning
domain Must equal the SIWE domain exactly
uriPrefix The SIWE uri must start with this
allowedChains Allowed chainIds
allowedResources SIWE resources must be a subset of this list; if empty, no resources are allowed
supportsEIP6492 Whether the app can verify smart-account signatures (see below)
expiresAt Expiry timestamp, or 0 for none

The wallet may auto-sign only when every rule matches, and it must still run all normal SIWE checks (fresh nonce, time validity, domain binding).

Policies are created, edited and deleted only inside the wallet UI. Apps cannot send hints that create a policy. A typical flow: on the first SIWE request the wallet asks "App X wants to log in with your account" with a checkbox "Automatically sign in to this site in the future".

Hardware wallets: auto-signing does not make sense if the user must press a button on a device. If supportsEIP6492 is false, the wallet must not auto-login for hardware-signer accounts. If true, the wallet may sign with a limited session key or delegation on a smart account or EIP-7702 account, since the app can verify such signatures via ERC-6492. Setting that up still requires a one-time prompt. ERC-7710 is one possible delegation mechanism.

Wallets may expose wallet_getCurrentAutoLoginPolicy so an app can check whether it can start a login on its own.

Sample code

App side: start a silent login if the wallet allows it.

const res = await window.ethereum.request({ method: "wallet_getCurrentAutoLoginPolicy" })
  .catch(() => null);                         // method is optional

if (res?.activePolicy) {
  const message = buildSiweMessage({           // your ERC-4361 message builder
    domain: location.host,
    uri: `${location.origin}/login`,
    chainId: 1,
    nonce: await fetchNonce(),
  });
  const signature = await window.ethereum.request({
    method: "personal_sign",
    params: [message, account],
  });
  await verifyOnServer(message, signature);    // no wallet prompt if policy matched
}

Wallet side, the match check from the spec's reference implementation:

function shouldAutoSign(M, P) {
  if (M.domain !== P.domain) return false;
  if (!M.uri.startsWith(P.uriPrefix)) return false;
  if (!P.allowedChains.includes(M.chainId)) return false;
  if (M.resources && !M.resources.every(r => (P.allowedResources || []).includes(r))) return false;
  if (P.expiresAt !== 0 && Date.now() >= P.expiresAt) return false;
  return true; // plus all standard SIWE validations
}

Things to know

  • Status is Review; details may still change.
  • The spec recommends auto-login be off by default, with a global switch to disable it.
  • Always match domain against the top-level page origin, so a malicious site cannot trigger auto-login through an embedded iframe of a trusted app.
  • Keep uriPrefix specific (for example a /login path) to avoid overly broad matches.
  • Only plain-text SIWE messages are covered; EIP-712 typed data is out of scope.

#siwe #wallet #login #authentication #ux

Details

Authors
Ivo Georgiev (@Ivshti), Vijay Krishnavanshi (@vijaykrishnavanshi)
Status
Review
Type
Standards Track / ERC
Created
2025-09-02
Requires

Machine-readable: Markdown · JSON