EIPs Explained

ERC-7555 · Draft · ERC · 2023-11-10

ERC-7555: Single Sign-On for Account Discovery

A redirect-based single sign-on flow that lets an app ask a key provider which smart account a user already has, so passkey and other non-secp256k1 users don't end up with a new account in every app.

What problem does it solve?

With ERC-4337 smart accounts, users can sign with passkeys, YubiKeys or phone secure enclaves instead of a classic secp256k1 private key. But those authenticators typically create a different key per domain. If a mobile app and a web app both use passkeys, the same person gets two unrelated keys, and each app happily deploys a fresh smart account for them.

The result is account fragmentation: one user, many unconnected addresses, assets scattered across them. An app has no standard way to ask "does this person already have an account somewhere?"

ERC-7555 borrows the web's single sign-on pattern so an application can send the user to a provider that knows their key, and get back the address of their existing smart account.

How it works

The proposal defines two routes on a provider, each a simple browser redirect with query parameters:

Route Request params Response params (sent to redirect_uri)
/auth/ redirect_uri, chain_id smart_account_address
/sendTransaction/ redirect_uri, chain_id, transaction (RLP-encoded) smart_account_address, tx_hash
  1. The app redirects the user to the provider's /auth/ URL.
  2. The provider authenticates the user however it likes (passkey, MPC, secure enclave…) and looks up any smart account deployed through it.
  3. The provider redirects back to the app's redirect_uri with the address in CAIP-10 format (eip155:<chainId>:<address>).

/sendTransaction/ combines authentication with a transaction to sign, saving a second redirect (for example to register a plugin on the account).

The standard deliberately does not cover how providers generate keys, how users sign across domains, or the UI.

Sample code

Request and callback URIs (placeholder hosts):

https://provider.example/auth/?redirect_uri=https://myapp.example/sso/callback&chain_id=1

https://myapp.example/sso/callback?smart_account_address=eip155:1:0xAbC...123

App-side handling in TypeScript:

// Start sign-in
export function signIn() {
  const url = new URL("https://provider.example/auth/");
  url.searchParams.set("redirect_uri", "https://myapp.example/sso/callback");
  url.searchParams.set("chain_id", "1");
  window.location.replace(url.toString());
}

// On /sso/callback
export function handleCallback(): { chainId: string; address: string } | null {
  const caip10 = new URL(window.location.href).searchParams.get("smart_account_address");
  if (!caip10) return null;
  const [ns, chainId, address] = caip10.split(":");   // "eip155", "1", "0x..."
  if (ns !== "eip155") return null;
  return { chainId, address };
}

Things to know

  • Status is Draft. The security section is explicitly marked as needing discussion.
  • A bare redirect proves nothing: anyone can open the callback URL with an arbitrary address. The spec suggests having the user sign a challenge, for example with Sign-In with Ethereum (ERC-4361), before trusting the result.
  • Redirect URIs must not use wildcards, to avoid open-redirect attacks.
  • Discovery only helps for accounts the chosen provider knows about. It does not unify accounts created through different providers.

#account-abstraction #sso #passkeys #wallets #discovery

Details

Authors
Alexander Müller (@alexmmueller), Gregory Markou (@GregTheGreek), Willem Olding (@Wollum), Belma Gutlic (@morrigan), Marin Petrunić (@mpetrunic), Pedro Gomes (@pedrouid)
Status
Draft
Type
Standards Track / ERC
Created
2023-11-10
Requires

Machine-readable: Markdown · JSON