HomeGuidesRecipesAPI ReferenceChangelog
Log In
Guides

Sign-In With Ethereum (SIWE) - Unblocker App

Introduction

Unblock API's implement the Sign-in with Ethereum (SIWE) standard (also known as EIP-4361) in order to identify users and confirm ownership of a blockchain address.

At a high level, the Sign-In With Ethereum standard requires the client to use a user's private key to sign a plaintext message containing a number of standardised fields and send that signed message to the server to prove account ownership.

The Unblock API uses the SIWE standard to create authenticated sessions for the user, and returns a session ID to the client as per mentioned in the Sign-up flow guide: Sign-up Flow.

Unblocker App

We have developed a small and simple app that allows the user to connect to a Wallet (e.g. via a Metamask widget) and generate a signed SIWE message which is required to log in on either the Core Unblock or Unblock FiatConnect APIs.

The app also features a Base64 image encoder (details here: Base64).

The Unblocker App is available at this link: Unblocker App.

Local App

The App is also available on GetUnblock Github: Unblocker (it contains instructions on how to set it up).

Getting started

🚧

Attention

Current available chains: Celo and Polygon (and their respective testnets).

Unblocker App works with Metamask and the Wallet Connect Module.

Optimism is temporarly not available for transfers.

The App should look like this:

🚧

Important

Only one wallet/account should be connect each time you want to generate signed Siwe message.

To switch between Metamask Accounts/Wallets the current wallet connected to the App should be disconnected manually on the widget. Afterwards click on Connect button and select the new account you wish to connect to.

Connecting with Metamask Wallet

When connecting with Metamask you will notice this warning:

This warning shows up due to Unblocker creating a signed SIWE message to a domain that is not the same as where it's hosted: getunblocker.getunblock.com and in the example above the signed message domain is sandbox.getunblock.com - they are not the same domain hence the warning showing on Metamask.

Using Unblocker to Login in Unblock

In order to login on Unblock a user must be created using this endpoint and having been given an API key from the Unblock team.

To start the login process connect your wallet and generate a signed SIWE message afterwards press on the Login button and this popup will show:

Insert the API key provided by Unblock team and press login. After a successful login this will show up:

🚧

Important

The unblock_session_id last for 4 hours after this time has passed a new login must be done to refresh the session - this means a new signed message has to be generated and log in again using the API key.

Encode Base64 Images

The app also features an option to upload and encode image with base64 (formats allowed are: JPEG, PNG).

These base64 strings are required in some KYC endpoints (simply copy the generated string and use it on the appropriate KYC endpoints).

The Image encoder functionality looks like this:


What’s Next