w4ll3 / sdp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sign-In with Ethereum for Discourse

Overview

Discourse is an open-source discussion platform used for most crypto governances and projects to discuss proposals, updates, and research. The following is a quick guide on how to add Sign-In with Ethereum to your existing Discourse.

Requirements

  • A self-hosted Discourse server

Note

The Sign-In with Ethereum plugin still requires users to enter an email to associate with their accounts after authenticating for the first time. If the user owns an ENS address, it will be the default selected username. Once an email address is associated, users can then sign in using the SIWE option at any time.

Enabling the Plugin

To install and enable the plugin on your self-hosted Discourse use the following method: Access your container’s app.yml file (present in /var/discourse/containers/)

cd /var/discourse
nano containers/app.yml

Add the plugin’s repository URL to your container’s app.yml file:

hooks:
  after_code:
    - exec:
      cd: $home/plugins
      cmd:
        - sudo -E -u discourse git clone https://github.com/discourse/docker_manager.git
        - sudo -E -u discourse git clone https://github.com/spruceid/discourse-siwe-auth.git

Follow the existing format of the docker_manager.git line; if it does not contain sudo -E -u discourse then insert - git clone https://github.com/spruceid/discourse-siwe-auth.git.

Rebuild the container:

cd /var/discourse
./launcher rebuild app

To disable it either remove the plugin or uncheck discourse siwe enabled at (Admin Settings -> Plugins -> discourse-siwe -> discourse siwe enabled ).

Discourse Plugins Enable plugin at settings

Enable WalletConnect

WalletConnect support can be provided via Infura. Create a new Infura project in order to receive a new Infura project ID. Then go to the settings (same as befor) and paste the ID in that location and click on the checkmark. Add infura id to plugin settings

Edit the message statement

By default a statement is added to the messages: Sign-in to Discourse via Ethereum. To edit this statement access the settings (same as before) and update it. Add infura id to plugin settings

About

License:Apache License 2.0


Languages

Language:C 59.1%Language:Ruby 14.5%Language:Assembly 9.2%Language:Shell 9.0%Language:Makefile 4.2%Language:M4 2.1%Language:Sage 0.8%Language:Roff 0.6%Language:Perl 0.2%Language:C++ 0.1%Language:Python 0.1%Language:JavaScript 0.1%Language:Dockerfile 0.0%Language:Handlebars 0.0%Language:CMake 0.0%Language:SCSS 0.0%