Connect account with Crypto Wallets

Hey Andy :slight_smile:

There’s a bit of history on this subject on meta (see e.g.).

Firstly, there’s an existing discourse-ethereum plugin (most likely out of date, but it does exist)

It essentially covers 1 and 2 on your list (well, a slightly different interpretation of ‘2’). It stores ethereum addresses alongside user accounts, uses web3.js to interact with metamask in the client and etherscan to get transaction details.

Secondly, I’ve previously built a Discourse crypto login plugin (also involving metamask) for a client before. That client has since pivoted to other things. Open sourcing that solution is not an option unfortunately (and it’s somewhat provider specific anyway). By-the-by (as it’s not technically on your list) the main hurdle to overcome with login-via-metamask is the ability to have user account without an attached email.

Your next step depends on what you’re trying to achieve here. If you just want to let users connect to a crypto wallet the discourse-ethereum plugin does that. You probably would just need to update some of the code to be compatible with the latest Discourse. That’s relatively easy job that anyone familiar with Discourse can handle do for you.

However, if you’re thinking about creating a more general plugin to connect crypto with Discourse, you’d first want to specify project in some detail with a view to the different applications the plugin could be used for, including login and group/category access, and potentially without a browser extension like metamask.

That kind of investigation would change the design of the plugin, moving more of the ethereum logic to the backend, allowing for more flexibility down the line when you want to add more features.

14 Likes