ERC-1078 · Stagnant · ERC · 2018-05-04
ERC-1078: Universal login / signup using ENS subdomains
A passwordless login and signup flow where your identity is a smart-contract account behind an ENS name, and each app or device gets its own revocable signing key.
What problem does it solve?
Early dapps asked every user to install a wallet, back up a seed phrase and fund an account with ether before they could do anything. Logging in to a new app on a new device meant moving that private key around, which is both scary and unsafe.
ERC-1078 sketches a different model. The user's long-lived identity is a contract (an ERC-725 identity that also accepts ERC-1077 executable signed messages), and people refer to it by an ENS name such as alice.app.eth. Devices and apps never hold the user's funds; they hold small, disposable keys that the identity contract has authorised. Losing a phone means revoking one key, not losing the account.
How it works
- Ask for a name. The app asks for the user's ENS name. Because checking whether a name exists is trivial, the app should treat signup and login as one smooth flow instead of separate forms.
- Sign up (new identity). The app generates a private key locally, deploys or sets up an identity contract, registers that key as the only admin key, registers the requested subdomain and transfers it to the identity contract, and optionally adds a recovery method. The spec suggests bundling this into one transaction and not making the user wait for confirmation.
- Log in (existing identity). The app generates a local key, resolves the ENS name to the identity address, and requests that the key be added with
addKey(key, level). The request is delivered via a peer messaging network,web3if available, an ERC-681 URI, or as a last resort a QR code the user scans with a device that already controls the identity. - Act. Many actions stay off-chain: the app signs messages with its key, and others check the identity contract to confirm that key belongs to the user. When an on-chain action is needed, the app builds an ERC-1077 signed message and a relayer submits it via
executeSigned.
The spec describes three privilege levels for keys:
| Level | Can do |
|---|---|
| Manager | Change the identity itself (add or remove keys) |
| Action | Send transactions to other addresses (move funds, assets) |
| Encryption | No transactions; sign off-chain messages (chat, game moves) |
Apps should request the lowest level they need.
Sample code
The spec's example of an ERC-681 request asking an identity to add a locally generated key:
ethereum:bob.example.eth?function=addKey(address='0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',uint=1)
Generating the device key and resolving the identity in an app (ethers v6, illustrative):
import { Wallet, JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider(process.env.RPC_URL);
// 1. A fresh key that lives only on this device and never holds funds
const deviceKey = Wallet.createRandom();
// 2. Resolve the user's ENS name to their identity contract
const identity = await provider.resolveName("bob.example.eth");
// 3. Build a request URI for a device that already controls the identity
const uri =
`ethereum:bob.example.eth?function=addKey(` +
`address='${deviceKey.address}',uint=1)`;
console.log(identity, uri); // show as a link or QR code
Things to know
- Status: Stagnant. The spec itself says no working implementation existed when it was written, and it was never finalised.
- It depends on ERC-1077 and ERC-725, which are also not final, and leaves the messaging layer for broadcasting requests as an open question.
- The ideas (contract accounts, per-device session keys, relayers paying gas) live on in later smart-account work such as ERC-4337; use those standards for new builds.
- Apps that create identities may charge or apply anti-sybil checks, since deploying a contract and registering a name costs gas.