{"eip":8019,"title":"Minimal Wallet-Managed Auto-Login for SIWE","description":"Defines a wallet-local allowlist for automatic signing of ERC-4361 messages when simple match rules succeed.","authors":["Ivo Georgiev (@Ivshti)","Vijay Krishnavanshi (@vijaykrishnavanshi)"],"status":"Review","type":"Standards Track","category":"ERC","created":"2025-09-02","requires":[4361],"discussionsTo":"https://ethereum-magicians.org/t/erc-8019-minimal-wallet-managed-auto-login-for-siwe/25348","repo":"ERCs","label":"ERC-8019","officialUrl":"https://eips.ethereum.org/EIPS/eip-8019","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8019.md","url":"https://eips.huatuo.xyz/eip-8019/","tldr":{"en":"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.","ja":"ウォレットが信頼するサイトのローカル許可リストを保持し、単純な一致ルールを満たしたとき、そのサイトの Sign-In with Ethereum メッセージを黙って署名する。再訪ユーザーはログインのプロンプトを省略できる。","ko":"지갑이 신뢰하는 사이트의 로컬 허용 목록을 유지하고, 단순한 일치 규칙을 통과하면 해당 사이트의 Sign-In with Ethereum 메시지에 조용히 서명한다. 재방문 사용자는 로그인 프롬프트를 건너뛸 수 있다.","zh":"让钱包在本地维护一份受信任网站的白名单，当简单的匹配规则通过时，静默签署这些网站的 Sign-In with Ethereum 消息，回访用户因此可以跳过登录提示。"},"tags":["siwe","wallet","login","authentication","ux"],"explainers":{"en":{"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"],"related":[4361,6492,7702,7710],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8019/","markdown":"## What problem does it solve?\n\n[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.\n\nERC-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.\n\n## How it works\n\nThe wallet stores one policy per trusted app:\n\n| Field | Meaning |\n| --- | --- |\n| `domain` | Must equal the SIWE `domain` exactly |\n| `uriPrefix` | The SIWE `uri` must start with this |\n| `allowedChains` | Allowed `chainId`s |\n| `allowedResources` | SIWE `resources` must be a subset of this list; if empty, no resources are allowed |\n| `supportsEIP6492` | Whether the app can verify smart-account signatures (see below) |\n| `expiresAt` | Expiry timestamp, or `0` for none |\n\nThe wallet **may** auto-sign only when every rule matches, and it must still run all normal SIWE checks (fresh nonce, time validity, domain binding).\n\nPolicies 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\".\n\n**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.\n\nWallets may expose `wallet_getCurrentAutoLoginPolicy` so an app can check whether it can start a login on its own.\n\n## Sample code\n\nApp side: start a silent login if the wallet allows it.\n\n```ts\nconst res = await window.ethereum.request({ method: \"wallet_getCurrentAutoLoginPolicy\" })\n  .catch(() =\u003e null);                         // method is optional\n\nif (res?.activePolicy) {\n  const message = buildSiweMessage({           // your ERC-4361 message builder\n    domain: location.host,\n    uri: `${location.origin}/login`,\n    chainId: 1,\n    nonce: await fetchNonce(),\n  });\n  const signature = await window.ethereum.request({\n    method: \"personal_sign\",\n    params: [message, account],\n  });\n  await verifyOnServer(message, signature);    // no wallet prompt if policy matched\n}\n```\n\nWallet side, the match check from the spec's reference implementation:\n\n```js\nfunction shouldAutoSign(M, P) {\n  if (M.domain !== P.domain) return false;\n  if (!M.uri.startsWith(P.uriPrefix)) return false;\n  if (!P.allowedChains.includes(M.chainId)) return false;\n  if (M.resources \u0026\u0026 !M.resources.every(r =\u003e (P.allowedResources || []).includes(r))) return false;\n  if (P.expiresAt !== 0 \u0026\u0026 Date.now() \u003e= P.expiresAt) return false;\n  return true; // plus all standard SIWE validations\n}\n```\n\n## Things to know\n\n- Status is **Review**; details may still change.\n- The spec recommends auto-login be **off by default**, with a global switch to disable it.\n- 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.\n- Keep `uriPrefix` specific (for example a `/login` path) to avoid overly broad matches.\n- Only plain-text SIWE messages are covered; EIP-712 typed data is out of scope.\n"},"ja":{"lang":"ja","tldr":"ウォレットが信頼するサイトのローカル許可リストを保持し、単純な一致ルールを満たしたとき、そのサイトの Sign-In with Ethereum メッセージを黙って署名する。再訪ユーザーはログインのプロンプトを省略できる。","tags":["siwe","wallet","login","authentication","ux"],"related":[4361,6492,7702,7710],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8019/","markdown":"## 何を解決するのか\n\n[ERC-4361](/eip-4361/)（Sign-In with Ethereum、SIWE）では、ウォレットが構造化されたテキストメッセージに署名することで、サイトがユーザーを認証できます。これは機能しますが、ユーザーは同じ信頼済みアプリの同じログインメッセージを何度も承認することになり、手間がかかるうえ、内容を読まずに「署名」をクリックする癖がついてしまいます。\n\nERC-8019 では、アプリではなく**ウォレット**が、特定のサイトを信頼すると判断し、少数の決定的な一致ルールを使ってその SIWE メッセージに自動で署名できます。このためにアプリ側の変更は必要ありません。\n\n## 仕組み\n\nウォレットは、信頼するアプリごとに 1 つのポリシーを保存します。\n\n| フィールド | 意味 |\n| --- | --- |\n| `domain` | SIWE の `domain` と完全に一致する必要がある |\n| `uriPrefix` | SIWE の `uri` がこれで始まる必要がある |\n| `allowedChains` | 許可される `chainId` |\n| `allowedResources` | SIWE の `resources` がこのリストの部分集合である必要がある。空の場合、resources は一切許可されない |\n| `supportsEIP6492` | アプリがスマートアカウントの署名を検証できるか（後述） |\n| `expiresAt` | 有効期限のタイムスタンプ。なしの場合は `0` |\n\nウォレットが自動署名**してもよい**のは、すべてのルールが一致した場合だけです。その場合でも、通常の SIWE のチェック（新しい nonce、時間的な有効性、ドメインの束縛）はすべて実行しなければなりません。\n\nポリシーの作成、編集、削除は**ウォレットの UI 内でのみ**行われます。アプリがポリシーを作成させるようなヒントを送ることはできません。典型的な流れは次のとおりです。最初の SIWE リクエストで、ウォレットが「アプリ X があなたのアカウントでログインしようとしています」と尋ね、「今後このサイトに自動でサインインする」というチェックボックスを表示します。\n\n**ハードウェアウォレット**: ユーザーがデバイス上のボタンを押す必要があるなら、自動署名は意味をなしません。`supportsEIP6492` が `false` の場合、ウォレットはハードウェア署名者のアカウントに対して自動ログインを行ってはいけません。`true` の場合、アプリは [ERC-6492](/eip-6492/) によってそのような署名を検証できるため、ウォレットはスマートアカウントや [EIP-7702](/eip-7702/) アカウント上で、限定的なセッションキーまたは委任を使って署名してもかまいません。その設定にも、1 回限りのプロンプトは必要です。[ERC-7710](/eip-7710/) は委任の仕組みの一例です。\n\nウォレットは `wallet_getCurrentAutoLoginPolicy` を公開してもかまいません。これにより、アプリは自力でログインを開始できるかを確認できます。\n\n## サンプルコード\n\nアプリ側: ウォレットが許可していれば、サイレントログインを開始する。\n\n```ts\nconst res = await window.ethereum.request({ method: \"wallet_getCurrentAutoLoginPolicy\" })\n  .catch(() =\u003e null);                         // method is optional\n\nif (res?.activePolicy) {\n  const message = buildSiweMessage({           // your ERC-4361 message builder\n    domain: location.host,\n    uri: `${location.origin}/login`,\n    chainId: 1,\n    nonce: await fetchNonce(),\n  });\n  const signature = await window.ethereum.request({\n    method: \"personal_sign\",\n    params: [message, account],\n  });\n  await verifyOnServer(message, signature);    // no wallet prompt if policy matched\n}\n```\n\nウォレット側: 仕様のリファレンス実装にある一致チェック。\n\n```js\nfunction shouldAutoSign(M, P) {\n  if (M.domain !== P.domain) return false;\n  if (!M.uri.startsWith(P.uriPrefix)) return false;\n  if (!P.allowedChains.includes(M.chainId)) return false;\n  if (M.resources \u0026\u0026 !M.resources.every(r =\u003e (P.allowedResources || []).includes(r))) return false;\n  if (P.expiresAt !== 0 \u0026\u0026 Date.now() \u003e= P.expiresAt) return false;\n  return true; // plus all standard SIWE validations\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Review** で、詳細はまだ変わる可能性があります。\n- 仕様は、自動ログインを**デフォルトでオフ**にし、無効化するためのグローバルスイッチを設けることを推奨しています。\n- 悪意あるサイトが、信頼済みアプリの埋め込み iframe を通じて自動ログインを発火させられないよう、`domain` は常にトップレベルのページオリジンと照合してください。\n- 広すぎる一致を避けるため、`uriPrefix` は具体的に（たとえば `/login` パスのように）してください。\n- 対象はプレーンテキストの SIWE メッセージのみです。EIP-712 の型付きデータは対象外です。\n"},"ko":{"lang":"ko","tldr":"지갑이 신뢰하는 사이트의 로컬 허용 목록을 유지하고, 단순한 일치 규칙을 통과하면 해당 사이트의 Sign-In with Ethereum 메시지에 조용히 서명한다. 재방문 사용자는 로그인 프롬프트를 건너뛸 수 있다.","tags":["siwe","wallet","login","authentication","ux"],"related":[4361,6492,7702,7710],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8019/","markdown":"## 어떤 문제를 해결하나요?\n\n[ERC-4361](/eip-4361/)(Sign-In with Ethereum, SIWE)은 지갑이 구조화된 텍스트 메시지에 서명하게 함으로써 사이트가 사용자를 인증할 수 있게 합니다. 잘 동작하지만, 사용자는 같은 신뢰하는 앱의 같은 로그인 메시지를 계속 반복해서 승인하게 되고, 이는 번거로울 뿐 아니라 내용을 읽지 않고 \"서명\"을 누르는 습관을 들입니다.\n\nERC-8019는 앱이 아니라 **지갑**이 특정 사이트를 신뢰하기로 결정하고, 소수의 결정론적 일치 규칙을 사용해 그 SIWE 메시지에 자동으로 서명하게 합니다. 이를 위해 앱은 아무것도 바꿀 필요가 없습니다.\n\n## 어떻게 동작하나요?\n\n지갑은 신뢰하는 앱마다 하나의 정책을 저장합니다.\n\n| 필드 | 의미 |\n| --- | --- |\n| `domain` | SIWE `domain`과 정확히 같아야 함 |\n| `uriPrefix` | SIWE `uri`가 이 값으로 시작해야 함 |\n| `allowedChains` | 허용되는 `chainId` |\n| `allowedResources` | SIWE `resources`가 이 목록의 부분집합이어야 함. 비어 있으면 resources는 허용되지 않음 |\n| `supportsEIP6492` | 앱이 스마트 계정 서명을 검증할 수 있는지 여부(아래 참고) |\n| `expiresAt` | 만료 타임스탬프, 없으면 `0` |\n\n지갑은 모든 규칙이 일치할 때**만** 자동 서명**할 수 있으며**, 그래도 일반적인 SIWE 검사(새로운 nonce, 시간 유효성, 도메인 바인딩)는 모두 수행해야 합니다.\n\n정책은 **지갑 UI 안에서만** 생성, 수정, 삭제됩니다. 앱이 힌트를 보내 정책을 만들 수는 없습니다. 일반적인 흐름은 이렇습니다. 첫 SIWE 요청에서 지갑이 \"앱 X가 내 계정으로 로그인하려고 합니다\"라고 묻고, \"앞으로 이 사이트에 자동으로 로그인\" 체크박스를 보여 줍니다.\n\n**하드웨어 지갑**: 사용자가 기기에서 버튼을 눌러야 한다면 자동 서명은 의미가 없습니다. `supportsEIP6492`가 `false`이면 지갑은 하드웨어 서명자 계정에 대해 자동 로그인을 해서는 안 됩니다. `true`이면 앱이 [ERC-6492](/eip-6492/)로 그런 서명을 검증할 수 있으므로, 지갑은 스마트 계정이나 [EIP-7702](/eip-7702/) 계정에서 제한된 세션 키나 위임으로 서명할 수 있습니다. 이를 설정하는 데에도 한 번의 프롬프트는 필요합니다. [ERC-7710](/eip-7710/)은 가능한 위임 메커니즘 중 하나입니다.\n\n지갑은 `wallet_getCurrentAutoLoginPolicy`를 노출해, 앱이 스스로 로그인을 시작할 수 있는지 확인하게 할 수 있습니다.\n\n## 샘플 코드\n\n앱 쪽: 지갑이 허용하면 조용한 로그인을 시작합니다.\n\n```ts\nconst res = await window.ethereum.request({ method: \"wallet_getCurrentAutoLoginPolicy\" })\n  .catch(() =\u003e null);                         // method is optional\n\nif (res?.activePolicy) {\n  const message = buildSiweMessage({           // your ERC-4361 message builder\n    domain: location.host,\n    uri: `${location.origin}/login`,\n    chainId: 1,\n    nonce: await fetchNonce(),\n  });\n  const signature = await window.ethereum.request({\n    method: \"personal_sign\",\n    params: [message, account],\n  });\n  await verifyOnServer(message, signature);    // no wallet prompt if policy matched\n}\n```\n\n지갑 쪽: 명세의 참조 구현에 있는 일치 검사입니다.\n\n```js\nfunction shouldAutoSign(M, P) {\n  if (M.domain !== P.domain) return false;\n  if (!M.uri.startsWith(P.uriPrefix)) return false;\n  if (!P.allowedChains.includes(M.chainId)) return false;\n  if (M.resources \u0026\u0026 !M.resources.every(r =\u003e (P.allowedResources || []).includes(r))) return false;\n  if (P.expiresAt !== 0 \u0026\u0026 Date.now() \u003e= P.expiresAt) return false;\n  return true; // plus all standard SIWE validations\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Review**이며 세부 사항은 아직 바뀔 수 있습니다.\n- 명세는 자동 로그인을 **기본적으로 꺼 두고**, 이를 비활성화하는 전역 스위치를 두기를 권장합니다.\n- 악의적인 사이트가 신뢰하는 앱을 임베드한 iframe으로 자동 로그인을 유발하지 못하도록, `domain`은 항상 최상위 페이지 origin과 대조하세요.\n- 너무 넓은 일치를 피하려면 `uriPrefix`를 구체적으로(예를 들어 `/login` 경로처럼) 지정하세요.\n- 일반 텍스트 SIWE 메시지만 다룹니다. EIP-712 타입 데이터는 범위 밖입니다.\n"},"zh":{"lang":"zh","tldr":"让钱包在本地维护一份受信任网站的白名单，当简单的匹配规则通过时，静默签署这些网站的 Sign-In with Ethereum 消息，回访用户因此可以跳过登录提示。","tags":["siwe","wallet","login","authentication","ux"],"related":[4361,6492,7702,7710],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8019/","markdown":"## 它解决什么问题？\n\n[ERC-4361](/eip-4361/)（Sign-In with Ethereum，SIWE）让网站通过要求钱包签署一条结构化文本消息来认证用户。这能用，但用户最终会为同一个受信任的应用一遍又一遍地批准同一条登录消息，既繁琐，又让人养成不看内容就点\"签名\"的习惯。\n\nERC-8019 允许由**钱包**而不是应用来决定某个网站是受信任的，并使用一小组确定性的匹配规则自动签署它的 SIWE 消息。应用无需任何改动即可使用。\n\n## 它如何运作\n\n钱包为每个受信任的应用保存一条策略：\n\n| 字段 | 含义 |\n| --- | --- |\n| `domain` | 必须与 SIWE 的 `domain` 完全相等 |\n| `uriPrefix` | SIWE 的 `uri` 必须以此开头 |\n| `allowedChains` | 允许的 `chainId` |\n| `allowedResources` | SIWE 的 `resources` 必须是此列表的子集；如果为空，则不允许任何 resources |\n| `supportsEIP6492` | 应用是否能验证智能账户签名（见下文） |\n| `expiresAt` | 过期时间戳，`0` 表示不过期 |\n\n只有当每条规则都匹配时，钱包**才可以**自动签名，并且仍必须执行所有常规的 SIWE 检查（新鲜的 nonce、时间有效性、域绑定）。\n\n策略**只能在钱包 UI 内**创建、编辑和删除。应用无法通过发送提示来创建策略。典型流程是：在第一次 SIWE 请求时，钱包询问\"应用 X 想用你的账户登录\"，并提供一个复选框\"以后自动登录此网站\"。\n\n**硬件钱包**：如果用户必须在设备上按按钮，自动签名就没有意义。如果 `supportsEIP6492` 为 `false`，钱包不得对硬件签名者账户进行自动登录。如果为 `true`，钱包可以在智能账户或 [EIP-7702](/eip-7702/) 账户上使用受限的会话密钥或委托来签名，因为应用可以通过 [ERC-6492](/eip-6492/) 验证这类签名。完成这一设置仍需要一次性的提示。[ERC-7710](/eip-7710/) 是一种可行的委托机制。\n\n钱包可以公开 `wallet_getCurrentAutoLoginPolicy`，让应用检查自己是否可以主动发起登录。\n\n## 示例代码\n\n应用端：如果钱包允许，就发起静默登录。\n\n```ts\nconst res = await window.ethereum.request({ method: \"wallet_getCurrentAutoLoginPolicy\" })\n  .catch(() =\u003e null);                         // method is optional\n\nif (res?.activePolicy) {\n  const message = buildSiweMessage({           // your ERC-4361 message builder\n    domain: location.host,\n    uri: `${location.origin}/login`,\n    chainId: 1,\n    nonce: await fetchNonce(),\n  });\n  const signature = await window.ethereum.request({\n    method: \"personal_sign\",\n    params: [message, account],\n  });\n  await verifyOnServer(message, signature);    // no wallet prompt if policy matched\n}\n```\n\n钱包端：规范参考实现中的匹配检查。\n\n```js\nfunction shouldAutoSign(M, P) {\n  if (M.domain !== P.domain) return false;\n  if (!M.uri.startsWith(P.uriPrefix)) return false;\n  if (!P.allowedChains.includes(M.chainId)) return false;\n  if (M.resources \u0026\u0026 !M.resources.every(r =\u003e (P.allowedResources || []).includes(r))) return false;\n  if (P.expiresAt !== 0 \u0026\u0026 Date.now() \u003e= P.expiresAt) return false;\n  return true; // plus all standard SIWE validations\n}\n```\n\n## 需要注意\n\n- 状态为 **Review**；细节仍可能变化。\n- 规范建议自动登录**默认关闭**，并提供全局开关以便禁用。\n- 请始终将 `domain` 与顶层页面的 origin 比对，这样恶意网站就无法通过嵌入受信任应用的 iframe 触发自动登录。\n- 请让 `uriPrefix` 足够具体（例如 `/login` 路径），避免匹配范围过宽。\n- 仅涵盖纯文本的 SIWE 消息；EIP-712 类型化数据不在范围内。\n"}}}
