# Document Identities Plugin

**URL:** <https://discourse.sourcecred.io/t/document-identities-plugin/495>\
**Category:** Initiatives Wish List\
**Created:** [December 27, 2019, 7:35pm UTC](https://discourse.sourcecred.io/t/document-identities-plugin/495 "2019-12-27T19:35:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![burrrata](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sourcecred.io/burrrata/32/135_2.png) [@burrrata](https://discourse.sourcecred.io/u/burrrata)\
**Post date:** [December 27, 2019, 7:35pm UTC](https://discourse.sourcecred.io/t/document-identities-plugin/495/1 "2019-12-27T19:35:54Z")

</div>

> The identities plugin is really cool, but not documented. Would be great to make it easier for people to understand and use it. Copied the text from the Identity plugin README here as a starting point.

Unlike most other plugins, the Identity plugin does not add any new contributions to the graph. Instead, it allows collapsing different user accounts together into a shared ‘identity’ node.

To see why this is valuable, imagine that a contributor has an account on both GitHub and Discourse (potentially with a different username on each service). We would like to combine these two identities together, so that we can represent that user’s combined cred properly. The Identity plugin enables this.

Specifically, the instance maintainer can provide a (locally unique) username for the user, along with a list of aliases the user is known by, e.g. `github/username` and `discourse/other_username` . The aliases are simple string representations, that are intended to be easy to maintain by hand in a configuration file. Then, the identity plugin will provide a list of `NodeContraction` s that can be used by `Graph.contractNodes` to combine the user identities as described.

[https://github.com/sourcecred/sourcecred/tree/master/src/plugins/identity](https://github.com/sourcecred/sourcecred/tree/master/src/plugins/identity)

> [@How to flow Cred to people with multiple accounts](https://discourse.sourcecred.io/t/how-to-flow-cred-to-people-with-multiple-accounts/461/2):
>
> A single user contributing across multiple accounts is already a solved problem in SourceCred. Consider that I contribute both through this account (which we can call discourse/decentralion) and my GitHub account (which we can call github/decentralion). This is why I wrote the identity plugin: it allows collapsing an arbitrary set of user identities into a single combined identity. So in the example of your forum, you could add an identity mapping that collapses discourse/random\_admin and disco…
