Giter Site home page Giter Site logo

3id-connect's Introduction

3Box Logo

Welcome to 3Box Labs!

Twitter Follow Discord

3Box Labs is a Web3 product studio that creates software to advance a more open, safe, and collaborative web. We are the inventors and a core maintainer of Ceramic, a decentralized network for composable data. Permissionless data composability will inevitably network all of the information on the web, transform the way we build applications, and connect users to their data, and each other, in new and exciting ways. To learn more about 3Box Labs, visit https://3boxlabs.com/.

Getting Started

๐Ÿ‘ค Visit Ceramic Network to build applications with composable data.

๐Ÿ’ฌ Join Ceramic Community Discord to chat with the core team and developer community

๐Ÿ‘ฉโ€๐Ÿ’ป Explore our blog to learn more about Ceramic, comopsable data and Web3 - and sign up for our newsletter.

3id-connect's People

Contributors

michaelsena avatar msterle avatar oed avatar simonovic86 avatar sterahi avatar zachferland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

3id-connect's Issues

3id-connect module, external provider

These are changes for part of 3id-connect module consumed by libraries (3boxjs) to use 3id-connect and its provider.

  • consume an eth or authprovider now (can pull most of the idea of an authprovider here)
  • consumes rpc calls from iframe for authenticate, createLink, migrate
    - migrate, returns seeds for main and spaces
    - authenticate returns auth secret

Reconcile migration and existing keychain with new idw/ceramic

Ideal upgrade path still means supporting what is currently in 3boxjs (no upgrade needed to migrate)

some work on this earlier, likely best path is developing legacy and new idw/connect separately, and then they run as two logical services in iframe consuming their rpc calls, legacy calls continue to work, migration takes place there, migration will run and take current serialized state and add to cereamic, if migration has taken place, will map legacy rpc calls to new 'service'

Argent support not working

Argent should support EIP1271 so it should work with 3id-connect. However right now it's failing with the error message below.
Provider returned signature from different account than requested.

Refactor out migrations as modules

Not exactly clear how this will look, but only way maintain 3id-connect/idw as we go forwards and easily support the migration. There is a full a migration implemented later, this will be pulling out the partial migration and being able to flag it. may run one after another as well

Iframe deploy and pipeline

domain
build / ci pipeline
maybe not needed at first, but consider versioning iframe, may simplify upgrade in future

Support keychain

Additional calls to the iframe for adding / removing auth methods. Public caip-10 links needs to be signed locally.

Visual consent flow, design final

This will be to support full requirements (like mobile, screensize, remaining design requirements, etc)

Will need to coordinate to fine exact line between v1 and design final. As well as align on tooling and make sure v1 does serve this.

Implement proper key derivation for account spaces

  • Derive keys according to the 3IP spec for each space that is being requested.
  • Allow user to see which spaces are being requested.
  • Save consents to spaces along with the origin of the app.
  • Send derived space seeds in the response.

Create Account Modal

no existing known dids
actions -> create account (in 3id) or link to other account (selfid)

3id-connect ceramic

move repos or split
clean up branches
split pipeline
move to app.3idconnect.org

Full Migration Support from 3boxjs

Map our current auth/link support to the general authProvide interface. Need to be able to consume something like web3modal through multiple authproviders, or that needs to map to interface in some way. Persist seed in iframe.

Setup testing framework for wallets

We need a testing framework that makes sure that all of the wallets we currently support actually work.

@zachferland Seems like this is out of scope for now, but if you have some free time to plan out the work needed and scope for this that would set us up for a more stable system in the future.

Auth to parent window

external auth will make rpc call to parent window now
probably create link at same time

Link Account Modal

existing dids in 3id-connect
actions -> Link to current (if one, if multiple, latest or default to second action) or link to other (selfid)

Set up deployment

We need to figure out how to best deploy this. My initial take is just to deploy;

  • master -> s3 bucket which account.3box.io points to
  • develop -> s3 bucket which account-dev.3box.io points to

Hardening v1 release

Track issues and bugs here, in prep for default roll out, where it must work most everywhere for everyone. Expect to see some requirements not anticipated.

Issues:
cant inject iframe on page load with cdn dist and server side rendering

UI (external provider)

Remove provider selection
Have good flow for signing outside iframe while still conveying info to user about what is happening

  • can background still while signing, but may want to allow app to set z-index, so that other modal/iframe providers can overlay it, or this can become a small notification style overlay

iframe service, external provider

Changes needed to module running in iframe

  • rpc calls to parent window for migrate, authMethod/authenticate, createLink, return cached results if available, instead of making calls
  • remove 3id from external auth, just consume seeds and cache

3id-connect 3idv0 to 3idv1 migration

detect if existing 3idv0 and no ceramic
if migrate - sign additional 3box message, 3id-did-provider 3idv0 then add authSecret.
if not - continue as usual

most of the migration logic in 3id-did-provider, making this no more difficult than described above

Improve user experience flows

Less any design stuff, just getting clearer idea on flows need to first release and then full migration (control hooks in 3boxjs and iframe (extra rpc calls)). For example, once full migration, likely makes sense to have provider selection, signing within own page (then redirect back), since very infrequent action, needs more space/control and would make clear that keys manage in this account webpage/iframe. Then all the consent flows could be small less obtrusive module overlays. Best to think through now so that all control handlers are available in 3boxjs. (don't want to require 3boxjs update for full migration, just idw iframe)

Upgrade and test 3id-connect with the newest versions of ceramic, cids, etc.

Wasn't sure who made sense to take this on so I assigned it to both @PaulLeCam and @zachferland for now, although probably only one of them needs to pick this up. But now that release candidates of the ceramic core packages are out with upgraded ipfs, cids, and multiformats, it would be good to make sure that 3id connect works with them so we can start telling people who are having version incompatibility errors that they can upgrade to the release candidate and use it.

Simple Ceramic auth flow

Use beta version of IDW 2.0
Create a ceramic-http-client and connect to a clientside ceramic node
A signle auth message. Something like give this app access to your 3ID

Decouple Account auth logic from UI

Currently index.js and account.js is a bit to interlinked. The Account class can be refeactored in such a way where it takes functions that affects the UI when needed. Also I think that the postmsg-rpc functions should be specified fro within the Account class.

Maybe we should also rename the Account class to something like AccountProvider.

Support multiple accounts

most user handling is out of 3id-connect, but this just needs a bit of refactor for internal state to support requests for any
this doesnt include selecting, just handling diff dids depending on account link

Flows/Modal Full Migration from 3boxjs Support

Will likely need some additional ui hooks/events available from the connect service provider. May want an additional migration request/view to communicate why they need to sign every space.

Simplify assumption for now will any auth method you add, you will also create a link. This will likely need some more error handling for unhappy paths.

Also simplifying, wont have ui for adding other arbitrary links yet.

So ui/flows for now will mostly look the same for now.

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.