Git Product home page Git Product logo

discourse-siwe-auth's Introduction

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 Discourse forum that is self-hosted or that is hosted with a provider that allows third party plugins, like Communiteq.

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:
  before_code:                             # <-- added
    - exec:                                # <-- added
        cmd:                               # <-- added
          - gem install rubyzip            # <-- added
  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   # <-- added

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 before) and paste the ID in that location and click on the checkmark. Add infura id to plugin settings

JSON RPC

As an alternative, you can configure the WalletConnect instance with JSON RPC endpoints, as shown below:

Doing so will supersede the Infura ID configuration option for WalletConnect specifically, other uses of an Infura ID won't be affected.

Add JSON RPC endpoints

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

discourse-siwe-auth's People

Contributors

w4ll3 avatar fabiandev1010 avatar obstropolos avatar communiteq avatar jtgi avatar tgxworld avatar theosirian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.