Skip to main content

Sign-In With Ethereum

Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

Sign-In With Ethereum is an open standard for authentication that enables users to control their digital identity with their Ethereum account. The integration uses the open-source OIDC Provider built by Login.xyz, which is hosted under oidc.signinwithethereum.org.

Follow this guide for instructions on how to set up Sign-In With Ethereum in WSO2 Identity Platform.

Register WSO2 Identity Platform in Sign-In With Ethereum​

You need to register WSO2 Identity Platform as an OIDC client application in oidc.signinwithethereum.org.

note

Follow the Sign-In With Ethereum documentation for detailed instructions.

To do so,

  1. Use the following curl command to register a new OIDC client.

    curl -X POST https://oidc.signinwithethereum.org/register
    -H 'Content-Type: application/json' -d '{"redirect_uris": ["https://api.asgardeo.io/t/{organization_name}/commonauth"]}'
  2. Take note of the client_id and client_secret returned from the response.

    The following is an example response:

    {
    "client_id": "9b49de48-d198-47e7-afff-7ee26cbcbc95",
    "client_secret": "{secret}",
    "registration_access_token": "{access_token}",
    "registration_client_uri": "https://oidc.signinwithethereum.org/client/9b49de48-d198-47e7-afff-7ee26cbcbc95",
    "redirect_uris": ["https://api.asgardeo.io/t/{organization_name}/commonauth"]
    }

Register the Sign-In With Ethereum IdP​

Follow the steps below to register the Sign-In With Ethereum IdP in WSO2 Identity Platform.

  1. On the WSO2 Identity Platform Console, go to Connections.

  2. Click Create Connection and select Sign-In With Ethereum.

  3. Enter the following details of the Sign-In With Ethereum identity provider and click Finish:

    Add Sign-In With Ethereum IDP in WSO2 Identity Platform
    ParameterDescription
    NameA unique name for this Sign-In With Ethereum identity provider.
    Client IDThe client ID obtained from oidc.signinwithethereum.org.
    Client secretThe client secret obtained from oidc.signinwithethereum.org.
  4. In the created connection, go to the Settings tab and see the list of scopes to which Sign-In With Ethereum has granted permissions.

    • openid: Engages the OpenID flow.
    • profile: Allows to view the user's basic profile data.
    note

    WSO2 Identity Platform needs these scopes to get user information. WSO2 Identity Platform checks the attribute configurations of the application and sends the relevant attributes received from Sign-In With Ethereum to the app.

Enable Sign-In With Ethereum​

The following guide shows you how to enable Sign-In With Ethereum in an application.

Before you begin

You need to register an application with WSO2 Identity Platform. You can register your own application or use one of the sample applications provided.

  1. On the WSO2 Identity Platform Console, go to Applications.

  2. Select your application, go to the Login Flow tab and enable Sign-In With Ethereum using your preferred editor:


    To add enable Sign-In With Ethereum using the Classic Editor:

    1. If you haven't defined a sign-in flow for the application, click Start with Default configuration to define a login flow with a username and a password.

    2. Click Add Authentication in the same step as the default configuration.

    3. From the list of connections that appear, select the Sign-In With Ethereum connection that you created and click Add.

      Add Sign-In With Ethereum login in WSO2 Identity Platform

  3. Click Update to save the changes.

Try it out​

Follow the steps given below.

  1. Access the application that you previously registered with WSO2 Identity Platform.

  2. Click Login to redirect to the WSO2 Identity Platform login page.

  3. On the WSO2 Identity Platform login page, choose the Sign-In With Ethereum IdP to log in.

    note

    You will be redirected to the login interface of Sign-In With Ethereum.

    Sign-In With Ethereum on WSO2 Identity Platform
  4. Click Sign-In With Ethereum again to log in.

    Sign-In With Ethereum's Login Interface
  5. Select a preferred Ethereum wallet.

    Sign-In With Ethereum wallet selection
  6. Sign the login request to log in to the application.

    Sign-In With Ethereum request signing

Configure connection​

To learn more about other configurations available for the connection, refer to the add federated login documentation.

Was this page helpful?