User account Identity and discovery on IPFS

sorry if this is a newbie question,

Is there a consensus/ standardized way on how Identity should be/is handled on IPFS or libp2p?

I am looking to build an app on IPFS, but im having trouble on how to identify or tie a username to an account.

an example would be a simple chat app. How would a user add/identify another user to chat with? Would they have a randomly generated ID that they’d have to send over another channel (ex, text message, a centralized user registry lookup, call and tell them their generated hash, etc.) or is there a way to do this without ever leaving the decentralized web?

@pineappleman it’s a great question and one that has a lot of nuance to it,(Zooko's triangle, why not use the DHT? has some more info). You seem to have the basic idea already.

TLDR: You can do this without leaving the decentralized web if you’re willing to either hook into a decentralized consensus system (like a blockchain), or have the users start off in an unnamed state before transitioning into a named state. You cannot have a unique, choosable name without a consensus mechanism.

Basically it depends on your application. Think of getting a new phone number, how do your friends know that it’s you? It’s a bunch of digits that are pretty annoying to remember so either you do something like:

  1. bootstrap from an existing identity system (e.g. use a service that forwards calls to/from you so it looks like you’re using your old number)
  2. have a trusted exchange (e.g. tell your friend your phone number in person or via another messaging system you trust like email)
  3. build/rebuild your identity (e.g. call them and you your voice to convince them it’s you)

You can use any of these approaches (or more) to help turn your random looking identity (hash of a public key) into something tied to your real world ID. Some of the technical examples of the above would be:

  1. Have people use some other system like Keybase (centralized although it can be mirrored and the merkle root is published in a blockchain), ENS (blockchain), or DNSLink (centralized/federated) to associate a public key with some recognizable name
  2. Out of band exchange, like email
  3. You just start chatting with with me using your public key based ID and then when user QmABC says “hey, it’s @pineappleman from the IPFS discuss forums” I can challenge you with more questions or tag you on my local machine as QmABC = @pineappleman

Perhaps other folks have found some nice friendly tools to share.


@pineappleman, if you’re going to be using OrbitDB to hold your data, I’d highly recommend stepping through the field guide. I just discovered it yesterday and though it is only about half finished, it gave me a much better sense of how to structure my data storage in the distributed web.

Note that the mechanism for instantiating a node has changed since its writing. You now do await IPFS.create(). This is the result of me going through the steps. If you get stuck, I might have encountered and solved the same problem…

Thanks for taking the time to reply!

So from my understanding, there isn’t a generally standardized way to handle identity right now without a universal consensus mechanism.
I guess it’s up to the application logic / user to generate an identity.

I will continue looking into this.


Thanks for the field guide, will read through it!