Coder Social home page Coder Social logo

bmorphism / js-3id Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ceramicstudio/js-3id

0.0 0.0 0.0 17.43 MB

Authentication system for Ceramic apps that works with blockchain wallets.

License: Other

JavaScript 2.61% TypeScript 93.72% HTML 0.52% SCSS 3.15%

js-3id's Introduction

ceramicnetwork Twitter

3ID-Connect

3ID Connect Image

3ID Connect provides 3ID user account management in a iframe, an easy way to access a DID provider, specifically ThreeIdProvider in the browser. It allows users to authenticate, manage, link and permission their 3ID keys to applications.

The library js-3id-did-provider handles most operations and the parent window (application) communicates with the iframe service over an RPC layer.

Getting started

Installation

npm install @3id/connect

Basic usage

import { EthereumAuthProvider, ThreeIdConnect } from '@3id/connect'

// ethProvider is an Ethereum provider and addresses an array of strings
const authProvider = new EthereumAuthProvider(ethProvider, addresses[0])

const threeIdConnect = new ThreeIdConnect()
await threeIdConnect.connect(authProvider)

See the example app for more details

Developement

Prerequisites

yarn v1 and lerna v4 should be installed globally:

npm install -g lerna yarn

Installation

Run yarn install from the root folder, this will install the dependencies and build the packages

Scripts

In the root folder:

  • lint: lints all apps and packages
  • build: builds all packages
  • test:unit: runs unit test
  • test:management: runs integration tests for the management lib with a Ceramic server
  • test:integration: runs integration tests from the integration app with a Ceramic server

Folders

Packages

Apps

  • example: Example usage of 3ID Connect with Ceramic and IDX
  • iframe: 3ID Connect iframe logic and UI
  • integration: 3ID Connect integration tests
  • management: 3ID accounts management UI used by 3ID Connect

Others

  • public: build assets for 3idconnect.org

Licenses

  • Apache-2.0 OR MIT for published packages
  • UIs used by 3ID Connect may use dependencies under other licenses

js-3id's People

Contributors

decentralgabe avatar dysbulic avatar michaelsena avatar msterle avatar natclark avatar oed avatar oznekenzo avatar paullecam avatar simonovic86 avatar skylar745 avatar sterahi avatar ukstv avatar zachferland 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.