Simple in-browser DID for development and testing

It seems obvious now, that the next generation authentication/authorization scheme is going to be based on DID. It is interoperable, self-sovereign, cryptography-based, with rich functionality around (see Verifiable Credentials, Verifiable Presentations).

The simplest thing to do with DID is login flow. Just like the notorious “Sign in with Google button”, but now “Continue Alone”. Immediately, you are invited to a wonderful nascency of the DID ecosystem. There is no readily available DID Identity Wallet to use, that does not require a phone or external infrastructure. Both are overkill, if you are just interested in a user proving if she really has a private key, while developing your server-side app.

So, I built a simple in-browser DID identity wallet called Maskodid that does that: through signing it can prove ownership of a private key. As encryption seems to be important, Maskodid also allows one to decrypt a message for a user’s DID.

It is intended to streamline development of server-side components. Maskodid is a few static HTML/CSS files, so it is blazing fast. For production, one better use Bloom or 3id-connect of Ceramic Network.

To start with Maskodid, just add it as a dependency to your React|Vue|Next project. It exposes three main functions:

  • authenticate — share user’s DID with the application,
  • sign — create signature, in JWS compact form,
  • decrypt — decrypt an encrypted message.

You could try it all live on Maskodid Playground. For questions, feel free to drop a message in GitHub Discussions.

Also, maskodid.did returns js-did instance. You could use Maskodid as a drop-in replacement of 3id-connect while in dev mode.

Happy hacking on our decentralized future!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Versioned style guides with React Storybook

Test a Render Prop!

JavaScript: Avoid long parameter lists in method signatures

MongoDB Realm, GraphQL, Apollo, Angular

Top AngularJS Development Tools in 2022

React with TypeScript Series: Part 1- Getting Started with Props

Top 3 Reasons to Implement Reusable Components

Improve existing manga reader website by scraping and modifying the DOM with nodejs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sergey Ukustov

Sergey Ukustov

More from Medium

3 Analog Task Trackers I Use

Cookies and User Authentication: How to use the Rails session to log users in

eCommerce integration with ERP, POS, or other local software

Creative Embedded Systems: Project 1