---
eip: 8019
label: ERC-8019
title: Minimal Wallet-Managed Auto-Login for SIWE
status: Review
type: Standards Track
category: ERC
created: 2025-09-02
requires: 4361
official: https://eips.ethereum.org/EIPS/eip-8019
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8019.md
canonical: https://eips.huatuo.xyz/eip-8019/
lang: en
tldr: 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.
tags: [siwe, wallet, login, authentication, ux]
---

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

> Defines a wallet-local allowlist for automatic signing of ERC-4361 messages when simple match rules succeed.

**TL;DR:** 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](/eip-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 `chainId`s |
| `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](/eip-7702/) account, since the app can verify such signatures via [ERC-6492](/eip-6492/). Setting that up still requires a one-time prompt. [ERC-7710](/eip-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.

```ts
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:

```js
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.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8019
