---
eip: 2525
label: ERC-2525
title: ENSLogin
status: Stagnant
type: Standards Track
category: ERC
created: 2020-02-19
requires: 137, 634, 1193, 2304
official: https://eips.ethereum.org/EIPS/eip-2525
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2525.md
canonical: https://eips.huatuo.xyz/eip-2525/
lang: en
tldr: "A stagnant proposal to log in to dapps with just an ENS name, whose text record points to the code that builds your wallet's EIP-1193 provider."
tags: [ens, login, wallet, provider, stagnant]
---

# ERC-2525: ENSLogin

> This presents a method to improve a universal method of login to the ethereum blockchain, leveraging the metadata storage provided by the ENS. We consider a user to be logged in when we have an EIP-1193 provider that can sign transaction and messages on his behalf.

**TL;DR:** A stagnant proposal to log in to dapps with just an ENS name, whose text record points to the code that builds your wallet's EIP-1193 provider.

## What problem does it solve?

A dapp that wants to support many wallets has to integrate each one: browser extensions inject an object, while hosted and hardware wallets need their own SDKs. Users must also know which button to press. New wallets struggle because dapps only integrate the popular ones.

ENSLogin proposes flipping this around: the user types an ENS name such as `alice.wallet.eth`, and the name itself tells the dapp which wallet to load. Any wallet that publishes a compatible module would then work with every ENSLogin dapp, with no central approval list.

## How it works

1. The dapp asks the user for an ENS name.
2. An SDK resolves the name through ENS ([EIP-137](/eip-137/)) to get an address and reads a **text record** ([EIP-634](/eip-634/)) with key `enslogin`. If the name has none, it falls back to the parent domain's `enslogin-default` record — so a wallet that hands out subdomains can set it once for all its users.
3. The record holds a link like `ipfs://…` or `https://…`. The SDK appends a suffix for the chain (SLIP-44 coin type, `60` for Ethereum) and language, e.g. `/60/js`, and downloads that module.
4. The module exposes a function `provider(config) => Promise<provider>` that returns an [EIP-1193](/eip-1193/) provider. From there the dapp uses it like any injected wallet.

The dapp may pass a configuration object: a common `provider` section (network, ENS registry address), wallet-specific keys prefixed with `_`, and SDK-specific keys prefixed with `__`.

Wallet-specific code lives only in the wallet's module, never in the SDK, so the SDK does not need updating when wallets change.

## Sample code

Resolving the `enslogin` text record with ethers v6 (the first step of the flow):

```ts
import { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider(process.env.RPC_URL);

async function findLoginModule(name: string): Promise<string | null> {
  const resolver = await provider.getResolver(name);
  const own = await resolver?.getText("enslogin");
  if (own) return own;

  const parent = name.split(".").slice(1).join(".");
  const parentResolver = await provider.getResolver(parent);
  return (await parentResolver?.getText("enslogin-default")) ?? null;
}

const base = await findLoginModule("alice.wallet.eth");
if (base) console.log("load module from", `${base}/60/js`);
```

Minimal config object from the spec:

```json
{ "provider": { "network": "goerli" } }
```

## Things to know

- Status is **Stagnant**. The spec is incomplete: the provider-link format is marked "not yet specified", the record keys are "subject to change", and the prototype and multichain sections are TODO.
- Loading and running code from a URL found in a name record is a large trust decision for a dapp. The spec leaves sandboxing and integrity checks open.
- ENSLogin only discovers the wallet; key storage and signing are entirely up to the wallet provider.
- Multichain addresses in ENS are covered by [EIP-2304](/eip-2304/).


---

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