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.
npm install @3id/connectimport { 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
yarn v1 and lerna v4 should be installed globally:
npm install -g lerna yarnRun yarn install from the root folder, this will install the dependencies and build the packages
In the root folder:
lint: lints all apps and packagesbuild: builds all packagestest:unit: runs unit testtest:management: runs integration tests for the management lib with a Ceramic servertest:integration: runs integration tests from the integration app with a Ceramic server
@3id/common: Common types and utilities used by packages@3id/connect: 3ID Connect library@3id/connect-display: 3ID Connect popup prompts@3id/manager: 3ID accounts storage and management@3id/test-utils: Testing utilities for apps and packages@3id/window-auth-provider: cross-window AuthProvider
example: Example usage of 3ID Connect with Ceramic and IDXiframe: 3ID Connect iframe logic and UIintegration: 3ID Connect integration testsmanagement: 3ID accounts management UI used by 3ID Connect
public: build assets for 3idconnect.org
- Apache-2.0 OR MIT for published packages
- UIs used by 3ID Connect may use dependencies under other licenses
